How to create Azure MySQL Database

In this article, we will see how to create Azure MySQL Database. Like MySQL on-premise server, we dont have multiple methods to create database in Azure MySQL Server. We can database in Azure MySQL server using MySQL Workbench. To create database in Azure MySQL server, logged in user must

Steps to create Azure MySQL database using GUI mode:

Continue reading How to create Azure MySQL Database

MySQL Ignoring query to other database

In this article, we will find the solution for “MySQL Ignoring query to other database”,

MySQL Ignoring query to other database

Cause and Resolution:

Cause:

I keep on getting this weird message, while executing any query in command prompt MySQL. I have tried to changing to all databases in my MySQL server. But error remains same.

Reason: I had missed the “u” flag for user so accidentally I had input the following command.

mysql -root -p

Solution:

Connect to MySQL Server with all flags as shown below. Then, error gone.

mysql -u root -p

So, from the above solution u is missing flag while connected to MySQL Server.

How to Rename a Database in MySQL

In this article, we will see how to Rename a Database in MySQL. In previous versions of MySQL, RENAME DATABASE is used to rename database. From all newer versions, RENAME DATABASE has been removed to avoid security risks.
We can rename database in MySQL using dump and restore process.

Steps to Rename a Database in MySQL:

mysqldump syntax:

mysqldump –u [UserName] –p[Password] –R [DB_Name] > [DB_Name].sql

Replace [UserName] and [Password] with the actual credentials for the database, and replace [DB_Name] with the exact name of the database you’re changing. There should be no space between -p and the password. The -R flag indicates that the dump file should retain all stored procedures and functions.

1) Create dump using mysqldump tool. Here r2schools is the database name.

mysqldump -u root -p -R r2schools > r2schools.sql

Continue reading How to Rename a Database in MySQL