Phpnow Reinstall the MySQL database method _ server Other

Source: Internet
Author: User

1.phpnow Reload MySQL Database

If you have previously reinstalled the system or uninstalled services, the original MySQL folder is completely intact, only to install MySQL as a service, you can do the following steps:
In the Bin directory
Msyql\bin>mysqld-nt Install service name--defaults-file= "My.ini file location"//install MySQL service
The service is installed with the specified service name, and the My.ini file is read at the specified location when the service runs
If the location of the My.ini is placed correctly, that is, placed under the default MySQL directory structure, you can specify the file location without adding--defaults-file= "My.ini file Location"


2. Move the file location when you reload MySQL

There are three settings in My.ini's [mysqld]
Basedir= "Letter:/phpnow/mysql-5.0.15b/"
Datadir= "Letter:/phpnow/mysql-5.0.15b/data"
Innodb_data_home_dir= "Letter:/phpnow/mysql-5.0.15b/data"
Where Basedir must be set when migrating, or it will basically cause the service to fail to start
Other InnoDB data file ibdata1 if not placed in the default location (for example, the Pc_webserver suite is set up in a separate database directory storage), then be sure to set
Innodb_data_home_dir path, otherwise the service can be started for the first time, and a new initial ibdata1 file will be created under the path where ibdata1 should be stored, but all data from the database using the InnoDB storage engine may be lost, And when you reboot again, you won't be able to start.
If you have modified the Ibdata1 file location, you can, after installation, query which databases use the InnoDB table and confirm that the databases are working:
Select Table_schema,count (*) from information_schema.tables where engine= ' InnoDB ' GROUP by Table_schema;


3. mysql directory structure under default Windows

MySQL root directory
--bin store MySQL client and server-side tools
--data store MySQL data, Include InnoDB file ibdata1
--share store standard error message
My.ini mysql configuration file
that is Bin,data,share, Mysq.ini directories and files in the MySQL root directory into the above structure, for the default path, MySQL does not need to specifically specify the path to find the relevant files
Phpnow under the default MySQL database in the data directory, The InnoDB data file Ibdata1 is also in the database directory, and the log file is also placed under Data directory.
under the Phpnow to reload MySQL when you can refer to the role of the various directories!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.