Wednesday, May 31, 2006

mySQL contd....

As said was a bit scared abt mySQL earlier... But Drupal demanded mySQL in place, so no other go!!

For standard configuration,

# cd /usr

# sudo ./bin/mysql_install_db --user=mysql

To know mySQL version,

# /usr/bin/mysqladmin version

To shut down,

# /usr/bin/mysqladmin -u root shutdown

To start back.

# /usr/bin/mysqld_safe --user=mysql &

Try the following,

# /usr/bin/mysqlshow

# /usr/bin/mysqlshow mysql

# /usr/bin/mysql -e "SELECT * FROM db" mysql

# mysqladmin -u root -p create samarpanam --> creates a database samarpanam...

To access database thru console:

# mysql -u root

Follow the syntax below for root password,

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

and this to create a new user,

mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;

'-p' has to be appended to all commands to execute since password has been set.

http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html

is the real companion to proceed further i believe...

1 Comments:

Anonymous Anonymous said...

Greets to the webmaster of this wonderful site. Keep working. Thank you.
»

10:15 PM  

Post a Comment

<< Home