Create a new user within the MySQL shell:
mysql> CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
Create Permissions:
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘newuser’@’localhost’;
Reload all the privileges.
mysql> FLUSH PRIVILEGES;
Your changes will now be in effect.
Revoke a permission:
mysql> REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;
Delete databases with DROP, you can use DROP to delete a user altogether:
mysql> DROP USER ‘demo’@‘localhost’;
To get a list of MySQL users:
mysql> select user,host from mysql.user;
To find the privilege(s) granted to a particular MySQL account:
mysql> show grants for ‘root’@’%’;
After test out your new user, log out by typing
mysql> quit

drop database goldman_wrdp8

CREATE Database goldman_wrdp8

use goldman_wrdp8;

source import_file.sql;
update wp_options SET option_value=’http://goldman168.no-ip.org/goldmanau’ where option_name=’siteurl’;

update wp_options SET option_value=’http://goldman168.no-ip.org/goldmanau’ where option_name=’home’;

extract a gz file?

Use guzip command as follows:
$ gunzip file.gz
OR
$ gzip -d file.gz

Change user password;

MySQL 5.7.6 and later:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

MySQL 5.7.5 and earlier:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

OR

UPDATE mysql.user SET authentication_string = PASSWORD(‘MyNewPass’), password_expired = ‘N’ WHERE User = ‘root’ AND Host = ‘localhost’; FLUSH PRIVILEGES;

Leave a Reply

Your email address will not be published.

Enter Captcha Here : *

Reload Image