One published in the last two daysArticle: Apache2.2.22 + php5.2.17 + mysql5.5.22: quickly set up and deploy the phpwind Open Source Forum. At that time, the goal was to quickly set up and deploy the phpwind Open Source Forum, so MySQL services and MySQL configuration were not completed .. Therefore, the database storage location, encoding, and so on are all the default ones...
After mysql-5.5.22-win32.zip is decompressed, there are 5 my-xxxx.ini configuration files in the directory,
By viewing the description in the configuration file, we recommend the configuration for different memory sizes.
In this example, the my-medium.ini is copied, renamed to my. ini, and the following lines are added:
[Client]
Default-character-set = utf8 client Encoding
[Mysqld]
Basedir = D:/SDK/MySQL MySQL installation directory
Datadir = D:/servers/MySQL/Data MySQL database storage directory
Default-character-set = utf8 Server code
Default-collation = utf8_general_ci Server Character Set
2. Install Windows Services (Windows 7 users must start cmd as an administrator ):
3. Start Windows Services
The error 1067 is returned ....
View the startup log file (the startup log is in the MySQL data directory. the INI file specifies datadir, so my log file is D: \ servers \ mysql \ data \ Siuon-PC.err ):
The unknown variable 'default-character-set = utf8'... remember this in the company's MySQL configuration... So Google... It turns out that the mysql version I downloaded is 5.5...
In this version, the variables Just configured are replaced by new ones.
Default-character-set -->Character_set_server p.s: default in [mysqld]-Character-Set
Default-collation--> Collation-Server
After modification:
Restart or report error 1067. The log is:
The MySQL. Host table does not exist. This is because I changed datadir to custom, but the system databases in the datadir directory (that is, MySQL/data) were not copied together to the new datadir directory. .
Copy the following folders to the directory specified by datadir in the new my. ini configuration file (in this example, D: \ servers \ mysql \ data directory ):
Start MySQL service OK ~~~ :
For how to change the root password, see apache2.2.22 + php5.2.17 + mysql5.5.22 to quickly build and deploy the phpwind Open Source Forum.