michaelsanford
Translator, Web Developer
When I installed MySQL (.51 for 10.1.5) I used the MySQL root user (called root, as per the instructions at Entropy). It got tiresome to always use mysql{admin} -u root -p {command} so I added myself to the users list in the MySQL database. This is how to do it:
Change "gwailo" to your short username in the code that begins with `insert`.
Notes
1. If you would rather not have to enter a password, just change the field that contains password("insert_your_password_here") to "". Then you'll never have to enter a password to access MySQL from your account. I wouldn't reccomend this if your system is open to the public, but mine isn't and MySQL is just for local development so I find it useful.
2. This grants yourself ALL privileges with both MySQL and MySQLAdmin! If you want to create other custom users for MySQL on your engine, change some of the fields to "N" (like Drop_priv, Shutdown_priv, Grant_priv).
Hope this is useful...
Code:
[gwailo:~]% mysql -u root -p mysql
mysql> insert into user values ("localhost", "gwailo", password("insert_desired_password"),
"Y", "Y", "Y", "Y", "Y",
"Y", "Y", "Y", "Y", "Y",
"Y", "Y", "Y", "Y");
Query OK, 1 row affected (0.02 sec)
mysql> select * from user where User="gwailo"\G
*************************** 1. row ***************************
Host: localhost
User: gwailo
Password:
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: Y
References_priv: Y
Index_priv: Y
Alter_priv: Y
3 rows in set (0.00 sec)
mysql> \Q
Change "gwailo" to your short username in the code that begins with `insert`.
Notes
1. If you would rather not have to enter a password, just change the field that contains password("insert_your_password_here") to "". Then you'll never have to enter a password to access MySQL from your account. I wouldn't reccomend this if your system is open to the public, but mine isn't and MySQL is just for local development so I find it useful.
2. This grants yourself ALL privileges with both MySQL and MySQLAdmin! If you want to create other custom users for MySQL on your engine, change some of the fields to "N" (like Drop_priv, Shutdown_priv, Grant_priv).
Hope this is useful...