Today I began to configure the environment of the plugin management system. During this process, I run into a trap when I installed the mysql on Windows 7 with the zip(non-install) package. I write this instructions to help me remember this process.
- Download the MySql Zip Package and extract it to some directory in which path there is no space. E.g,
D:\mysql
. - Add
D:\mysql\bin
to environment variable PATH so that you can use mysql command in command line. - Open a cmd as administrator and run command
D:\mysql\bin\mysqld --install
in the command line to add mysql service to the system. - Run command
D:\mysql\bin\mysqld --console
in the cmd to start the mysql service. - Then you can type
D:\mysql\bin\mysql -u root -p
in another cmd to use mysql.
It’s common that user creates a new user account of mysql to use database. The following are the commands:
mysql> CREATE USER username IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO username@localhost;
mysql> flush privileges;
But in my opinion, I think we can use mysql in linux system with more comfort. Windows is not a good option to develop such a bit project.