Mysql common operation

mysql backup:

docker exec container ID mysqldump -uroot -p password--databases library name> library name.sql
--Create user:

create user 'username'@'%' IDENTIFIED BY 'password';
--Create library:
create database if not exists database_name default character set = 'utf8';
--Authorize users with all permissions for a single library:
GRANT all ON database_name.* to [emailprotected]'%';
--Change user password:
ALTER USER 'root'@'%' IDENTIFIED BY 'mysql,.1q';--Cancel authorization:
revoke all on database_name.* from [emailprotected]'%';
--View user permissions:
show grants for username;
--Use Navicat Premium software to connect library test< /pre>

Note: When operating the mysql library to add, delete and modify the user, it is best to use the flush privileges command to refresh the privileges when the operation is completed. Otherwise, the modification may not take effect

docker exec container ID mysqldump -uroot -p password --databases library name> library name.sql
--Create user:

create user 'username'@'%' IDENTIFIED BY 'password';

--Create library:

create database if not exists database_name default character set = 'utf8';

--Authorize users with all permissions for a single library:

GRANT all ON database_name.* to [emailprotected]'%';

--Change user password:

ALTER USER 'root'@'%' IDENTIFIED BY 'mysql,.1q';--Cancel authorization:

revoke all on database_name.* from [emailprotected]'%';

--View user permissions:

show grants for username;

--Use Navicat Premium software to connect library test< /pre>

Note: When operating the mysql library to add, delete and modify the user, it is best to use the flush privileges command to refresh the privileges when the operation is completed. Otherwise, the modification may not take effect

-- Create user:

create user 'username'@'%' IDENTIFIED BY 'password';

--Create library:

create database if not exists database_name default character set = 'utf8';

--Authorize users with all permissions for a single library:

GRANT all ON database_name.* to [emailprotected]'%';

--Change user password:

ALTER USER 'root'@'%' IDENTIFIED BY 'mysql,.1q';--Cancel authorization:

revoke all on database_name.* from [emailprotected]'%';

--View user permissions:

show grants for username;

--Use Navicat Premium software to connect library test< /pre>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2968 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.