MysqlMysql

  Main Menu

Home: Linux: Mysql: Index
PHP MySQL Home:
Here you will find some basic MySQL configurational tips and tricks.

The first thing the readme says to do is to set a root password, but it's not that clear on how to do that. As root do this:
mysqladmin password newpass

If you are changing your password, then you will have to do this:
mysqladmin -p password newpass
You will be prompted for your old password, then your password will be set to 'newpass'.

Say you just installed mysql, and want to make a superuser account for yourself. Use your regular linux username. Mine is tsmith. Know that most all mysql commands end with a semi-colon.

As root do:
mysql
use mysql;
show tables;
create temporary table t1 select * from user where User = 'root';
update t1 set User = 'tsmith', password = password('newpass') where 1;
insert into user select * from t1;
flush privileges;

Now, you just do mysql -p at a terminal, and you are free to do whatever you like. :)

 

Thus spake the master programmer:

``When the program is being tested, it is too late to make design changes.''

 

<Index>crawl this