Currently I am learning Spring Boot. I follow some tutorials but there is a part requires to use DBMS. So I decide to use MySQL as a database. But I don't want to install it as as service neither install with Windows installer.
I decide to download an archive version to run it as standalone application. I expect it will be ready to use as the installer version but it is not as easy as I think.
The first thing you have to do after extract the archive file is to copy my-default.ini to my.ini
Open my.ini with notepad or text editor that you like, edit these lines as show below
Second you have to mysql bin directory and then input the following command in command prompt
If you forget this step the mysql daemon will prompt some error on about cannot find table mysql.user and mysql.plugin etc. Because there is no database has been initialized yet.
Once it has finished the command prompt will let you know the temporary password, use that password to log in with mysql client and change to another password as you desire with below command
I decide to download an archive version to run it as standalone application. I expect it will be ready to use as the installer version but it is not as easy as I think.
The first thing you have to do after extract the archive file is to copy my-default.ini to my.ini
Open my.ini with notepad or text editor that you like, edit these lines as show below
basedir = X:/<pat to your mysql folderh>/mysql-5.7.9-winx64Important! Don't forget to create the folder data to the path they you refer in datadir
datadir = X:/<pat to your mysql folderh>/mysql-5.7.9-winx64/data
Second you have to mysql bin directory and then input the following command in command prompt
mysqld --initialize --console--console is optional to see the verbose in command prompt
If you forget this step the mysql daemon will prompt some error on about cannot find table mysql.user and mysql.plugin etc. Because there is no database has been initialized yet.
Once it has finished the command prompt will let you know the temporary password, use that password to log in with mysql client and change to another password as you desire with below command
SET password=PASSWORD('yourpasswordhere');Next time you can log in with your new password.
ความคิดเห็น
แสดงความคิดเห็น