Changing the charset for a MySQL database

Let us say that you have created a MySQL database with the default charset. If you realize that you need to now store non-English characters, say Telugu or Hindi characters into the database, you can change to charset associated with the database to make this happen. Run the following commands. ALTER DATABASE <database name> CHARACTER

MySQL root password after installation

If you are wondering what the root password of MySQL is, here are the steps which will help you reset the same. $ sudo apt install mysql-server $ sudo cat /etc/mysql/debian.cnf Note the lines which read: user = debian-sys-maint password = <SomePassword> $ mysql -u debian-sys-maint -p Enter password:  (Enter password <SomePassword> from above here)

Creating New User in MySQL

When you create a new database in MySQL, it is a good idea to associate a new user(s) with the database. Here are the steps that you will need to follow. Create new database Create new user create user <username> identified by ‘<password>’; This will create a new user with the specified password. Grant privileges: