Reset mysql root password

mysql reset password

Steps to reset the mysql root password Step # 1 : Stop mysql service # /etc/init.d/mysql stop Step # 2: Start to MySQL server w/o password: # mysqld_safe –skip-grant-tables Step # 3: Connect to mysql server using mysql client: # mysql -u root Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL … Read more

MySQL Master-Master-Slave-Slave Replication

Here we are going to create a Master -> Master -> Slave -> Slave replications architecture. I am expecting here , you have MySQL installed and set-up as normal.       Master 1 will be known as Master 1 and Slave 2 with IP 10.1.1.1 Master 2 will be known as Master 2 and Slave 1 … Read more

convert time in seconds to HH:MM:SS format in MySQL?

You can use MySQL function SEC_TO_TIME(). Example: SELECT SEC_TO_TIME(2378); Output is: 00:39:38  

Resolved : mysql replica : Relay log read failure: Could not parse relay log event entry.

I’m not sure what the root cause may be. But to recover from this situation, you’d want to instruct MySQL to clear out all the relay-bin-logs beyond the following point Relay_Master_Log_File: mysql-bin.000xxx Exec_Master_Log_Pos: 143983426 by doing the following: mysql> STOP SLAVE; mysql> CHANGE MASTER TO MASTER_LOG_FILE = ‘mysql-bin.000xxx’, MASTER_LOG_POS = 143983426; mysql> START SLAVE;      

Failed to connect to MySQL-asterisk

Files need to check are: /etc/asterisk/res_odbc.conf /etc/odbcinst.ini To resolve this , You have to check the correct configuration of above file. For Example : in —  /etc/odbcinst.ini [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc3.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1 or [asterisk-connector] Description = MySQL connection to ‘asterisk’ database Driver = MySQL Database … Read more

Import large csv file using phpMyAdmin

phpmyadmin error

Getting Error while upload large file from phpMyAdmin: Soution: change the memory limit in php.ini file both upload_max_filesize and post_max_size also. Then restart the httpd service (web service)    

MySQL Skip Duplicate Replication Errors : skip replication error

mysql master - slave replication

Normally MySQL replication will stop whenever there is an error running a query on the slave. This happens in order for us to be able to identify the problem and fix it, and keep the data consistent with the mater that has sent the query. You can skip such errors, even if this is not recommended, as … Read more

Managing Views in MySQL : Showing mysql view definition

Summary: in this tutorial, you will learn how to manage views in MySQL including displaying, modifying and removing views. Show view definition in MySQL MySQL provides the SHOW CREATE VIEW statement that helps you show view definition. The following is the syntax of the SHOW CREATE VIEW statement:   1 SHOW CREATE VIEW [database_name].[view_ name]; To display the definition of a … Read more

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