`emp_id` int unsigned NOT NULL AUTO_INCREMENT,
To create a table use below example, adjust according to your requirement: With Collate at Column CREATE TABLE `employee` ( To truncate table execute command truncate table in the command line tool. To drop a table from database use command drop. To see warnings if there is any, execute command show warnings in the command line tool. To switch to another database execute command use in the command line tool. To create database in MySQL server execute the command create database in the command tool. Common Operationsīy default test database exists in the MySQL server.
The above command will prompt for your root user’s password and you can type and you will see the same window in MySQL client as you had seen while using without option -p in the command. To access again your MySQL database using MySQL client execute the following command: mysql.exe -u root -p Now exit your MySQL client using exit command and restart your MySQL server and MySQL client. In the above command you should replace the string your password by actual password you want to use for user root.Įxecute the following command to reflect your changes permanently: FLUSH PRIVILEGES In the MySQL client execute the following command to set the password: ALTER USER IDENTIFIED BY 'your password' In the above using MySQL client I have logged in without using password but it is not a good idea to keep it open for everyone without using password. You can also set password for your root user. You can also use any MySQL server client (SQLyog, HeidiSQL, etc.) to connect the server. Go through the following steps to initialize MySQL server for the first time. Initialization can be done in two ways: secure and insecure ways. I am done with installation of MySQL server in the above section. Note that images below may be with the older version of MySQL server but the installation has been tested with the versions which are mentioned in Prerequisites section above.