Prihlásiť

MySQL Administration


13. 8. 2009

How to reset root password?

pkill mysqld
mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set Password=PASSWORD('my_pass') where user='root';
flush privileges;
exit;

Create database and grant user

mysql -u root -p
my_password
create database my_db;
grant all privileges on my_user.* to 'my_db'@'localhost' identified by 'my_pass';

Import sql file

use mydatabase
source filename.sql

Export/Import database

mysqldump -u username -ppassword database_name > dump.sql
mysql -u username -ppassword database_name < dump.sql

Komentáre



* Pri odpovedi vám príde notifikácia na e-mail
*



* Pri odpovedi vám príde notifikácia na e-mail
*