Advertise

Sunday, November 1, 2009

PHP Deployment in Fedora Core 7,8,9

yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

phpmyadmin: cannot load mcrypt extension

Just Install php-mcrypt and libmcrypt.
and for php5 install php5-mcrypt and libcrypt

ifconfig!! Command not found!!

Check to see that /sbin is in your $PATH variable as root. If not, add with

PATH=$PATH:/sbin/

That should fix it.

How-To create a MySQL database and set privileges to a user

On default settings, mysql root user do not need a password to authenticate from localhost. In this case, user can login as root on your mysql server using:
$ mysql -u root
If a password is required, use the extra switch -p:
$ mysql -u root -p
Enter password:
Now that you are logged in, we will create a database:
mysql> create database ramdb;
Query OK, 1 row affected (0.00 sec)
We allow user ramuser to connect to the server from localhost using the password rampasswd:
mysql> grant usage on *.* to ramuser@localhost identified by 'passwd';
Query OK, 0 rows affected (0.00 sec)
And finally we grant all privileges on the ramdb database to this user:
mysql> grant all privileges on ramdb.* to ramuser@localhost ;
Query OK, 0 rows affected (0.00 sec)
And that's it. You can now check that you can connect to the MySQL server using this command:
$ mysql -u ramuser -p'passwd' ramdb
Your MySQL connection id is 12
Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Changing MySQL user password using mysql sql command

MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user ram: 1) Login to mysql server, type following command at shell prompt:
$ mysql -u root -p
2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
3) Change password for user ram:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='ram';
4) Reload privileges:
mysql> flush privileges;
mysql> quit

Change MySQL password for other user

To change a user password you need to type (let us assume you would like to change password for ram):
$ mysqladmin -u ram -p oldpassword newpass

Saturday, October 31, 2009

mysqladmin command to change root password

Hi All

If you people wanted to change mysql root password . Please use below mentioned
Procedure.First login into the terminal then issue below mentioned command to change password.
Hope this will help someone who wanted to change mysql root password and this root password is different from linux PC root Login Password


$ mysqladmin -u root password xyznewpassword
However, if you want to change (or update) a root password, then you need to use following command
$ mysqladmin -u root -p oldpassword newpass
Enter password: