20110825

mysql user with priviledges to his db

mysql> create database user_name DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
mysql> grant usage on *.* to user_name@localhost identified by 'user_pwd';
mysql> grant all privileges on user_name.* to user_name@localhost;

3 komentāri:

JD teica...

inline connecting: mysql -u user_name -ppassword database_name

JD teica...

connect form outside: mysql -h ip_adress -u user_name -ppasword db_name

j.k. teica...

mysqldump -h [hostname] -u [user] -p[password] [database_name] > [backupfile].dump

mysql -h [hostname] -u [user] -p[password] [database_name] < [backupfile].dump