Real life problems solved

Advert

MySQL add new user

To add a new user to MySQL perform the following

In PuTTY log into your server with MySQL on it and open MySQL using the following command

mysql -u root -p

It will now as for your password which you should type in

Now set up your users, you can limit where a user can log in from by changing the '@'%'. % means from anywhere, localhost '@'localhost' would mean just from the local computer, or you could add IP addresses in.

The second line grants all privileges to this user, again you can modify this to only add certain permissions, a list of which can be found here

CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
Adsense