MySQL add user privilege

Linux config mysql

go to /etc/mysql/mysql.conf.d/

> vim mysqld.conf

command out

bind-address =


# bind-address =


get in mysql

$ mysql -u root -p  (-localhost)
Enter password:

if you want to create user fun with password love, and who can access the database from anywhere

> create user 'fun'@'%' identified by 'love'


> grant all privileges on *.* to 'fun'@'%' with grant option;

>flush privileges;


mysql> GRANT ALL ON . to root@’′ IDENTIFIED BY ‘your-root-password’;

Leave a Reply

Your email address will not be published.

Notice: Undefined index: cookies in /var/www/html/wp-content/plugins/live-composer-page-builder/modules/tp-comments-form/module.php on line 1638