kami_iwinaru, what happens when you type
If you get a mysql> prompt, then type
Code:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
Change yourpassword to whatever you wish.
Keep the single quotes, they are part of the command.
If, on the other hand, the above command does not get you to a mysql> prompt, then do this:
Code:
sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
mysql>flush privileges
mysql>quit
sudo killall mysqld
sudo /etc/init.d/mysql start
This will allow you to (re)set your mysql root password. You can also skip to
Code:
mysqladmin -u root password password_i_choose
command. If you'd like to check that mysqladmin works, however, do this:
Code:
mysqladmin -u root -p version
You should see some innocuous version info.
When prompted for a password, type in your mysql root password.
Note that once a mysql root password has been set,
you must always use the -p flag when using the mysql or mysqladmin commands. The -p flag tells the program to prompt for a password.
Your mysql root password is a completely different thing than your Ubuntu password(s). For security's sake, they should be different passwords.
Bookmarks