Joel On Software
The Old New Thing
The Daily WTF
AI Game Dev
Digital Gunfire Radio
You are visitor #
Javier Arévalo Baeza
|MySQL (Jare)||April 17th, 2011 - 13:33|
|In the previous post, I made references to MySQL but didn't say anything about a quick local setup. So here's what I did for mine:
- Download MySQL binaries from http://dev.mysql.com/downloads/mysql/. I chose the huge 64-bit Zip archive.
- I unzipped the /bin/, /data/, /docs/ and /share/english/ folders into my destination MySQL folder. Then I deleted all the *.pdb files.
- Start the server via start mysqld. You can later stop it with mysqladmin.exe shutdown -u root.
- By default it has a root user without password, and an anonymous user.
- Run the client with mysql -u root.
- Delete the anonymous user or it will mess up with your ability to connect using other users you create: DELETE FROM mysql.user WHERE user=''; FLUSH PRIVILEGES;
- Create your database and your development user: CREATE DATABASE MyDatabase; GRANT SELECT, CREATE, DELETE, UPDATE, INSERT ON MyDatabase.* to MyUser@'%' IDENTIFIED BY "MyPassword";
- Now you can connect as your development user with mysql -u MyUser -pMyPassword.
- I recommend downloading MySQL Workbench from http://dev.mysql.com/downloads/workbench/ to perform database maintenance.