Category Archives: mysql

mysql reset root password

http://www.cyberciti.biz/tips/recover-mysql-root-password.htmlon fedora: /etc/init.d/mysqld on debian: /etc/initd/mysql /etc/init.d/mysql stop mysqld_safe –skip-grant-tables & mysql -u root  mysql> use mysql;mysql> update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;mysql> flush privileges;mysql> quit /etc/init.d/mysql start

Posted in mysql | Leave a comment

mysql testdb

mysql> create database testdb;Query OK, 1 row affected (0.03 sec) mysql> create user ‘testuser’@’localhost’ identified by ‘password’;Query OK, 0 rows affected (0.06 sec) mysql> use testdb;Database changedmysql> grant all on testdb.* to ‘testdb’@’localhost’;Query OK, 0 rows affected (0.00 sec) mysql>flush … Continue reading

Posted in mysql | Leave a comment

mysqladmin

mysqladmin cmd  mysql -u uid -p blah_db <blah.sql

Posted in mysql | Leave a comment