mysql create user and grant permission
Create user CREATE USER ‘super’@’%’ IDENTIFIED BY PASSWORD ‘*01A6717B58FF5C7EAFFF6CB7C96F7428EA65FE4C’; Grant Permission: GRANT ALL ON *.* TO easy@’10.0.20.212′; Flush Privileges: FLUSH PRIVILEGES
Create user CREATE USER ‘super’@’%’ IDENTIFIED BY PASSWORD ‘*01A6717B58FF5C7EAFFF6CB7C96F7428EA65FE4C’; Grant Permission: GRANT ALL ON *.* TO easy@’10.0.20.212′; Flush Privileges: FLUSH PRIVILEGES
To Resolve such kind of issue, check the master relay log as follow; mysql> slave stop; Query OK, 0 rows affected (0.00 sec) mysql> change master to master_log_file=’mysql-bin.000001′,master_log_pos=207078754; Query OK, 0 rows affected (0.04 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) Now you can check , Slave should start working.
Waiting for master update The initial state before Connecting to master. Connecting to master The thread is attempting to connect to the master. Checking master version A state that occurs very briefly, after the connection to the master is established. Registering slave on master A state that occurs very briefly after the connection to the … Read more
Mostly MySQL uses /var/lib/mysql directory as default data directory for Linux based systems We are showing here how to change the default directory to different directory. Follow the below steps to make all the changes. In some cases service name, default data directory or MySQL configuration file path change. So use all the command as … Read more
MySQL has introduced some new interesting features, like stored procedures and triggers. I will show in this small post how we can backup and restore these components using mysqldump. What is Stored Procedure ? A stored procedure, by definition, is a segment of declarative SQL code which is stored in the database catalog and can … Read more
I connect to mysql from my Linux shell. Every now and then I run a SELECT query that is too big. It prints and prints and I already know this is not what I meant. I would like to stop the query. Hitting Ctrl+C (a couple of times) kills mysql completely and takes me back … Read more
What i want to do is : example db id name —– —— 1 Mark 2 Mike 3 Paul 4 Mike 5 Mike 6 John 7 Mark expected result name count —– —– Mike 3 Mark 2 Paul 1 John 1
SELECT <…> FROM A.table1 t1 JOIN B.table2 t2 ON t2.column2 = t1.column1;
The idea behind partitioning isn’t to use multiple servers but to use multiple tables instead of one table. You can divide a table into many tables so that you can have old data in one sub table and new data in another table. Then the database can optimize queries where you ask for new data … Read more