Error 1045(28000) Access Denied for user ‘root’@’localhost’
From http://zxy5241.spaces.live.com/blog/cns! 7682A3008CFA2BB0! 361.entry
When installing mysql database in Windows operating system, you encounter Error 1045(28000) Access Denied for user ‘root’@’localhost’, you need to reset the password.
the specific method is:
1. First, find my. Ini configuration file in the installation directory, open the configuration file, find the line [mysqld], add skip-gran-tables below and save the file, and restart mysql dynamic service.
2. Then execute mysql -u root mysql
mysql> update user set password=password(‘newpassword’) where user=’root’;
mysql> Flush privileges;
where newpassword is root’s newpassword. 3. Remove the line that added to my. Ini configuration file just now, and finally restart mysql.
After installing mysql or uninstalling the downloaded free version, the default is no my.ini file.
. However, there are several similar files, such as [code] my-small-ini, my-media.ini, my-large. Ini, my-huge. Ini, [/code].
these files are the different configuration information recommended by mysql for different applications; But these configurations will only be applied if you put them in my. Ini.
where:
1, my-small. Ini is designed for small database. This model should not be used for databases that contain common items.
2, my-media.ini is designed for medium-sized databases. If you are using RHEL in the enterprise, you will have significantly more physical memory than the minimum RAM requirements for this operating system (256MB). As you can see, if you have that much RAM memory available, you can naturally run other services on the same machine.
3, my-larg.ini is designed for use exclusively with a SQL database. Since it can use up to 512MB of memory for the database, at least 1GB of RAM will be required on this type of system so that it can handle both operating system and database applications.
4, my-huge. Ini is designed for databases in enterprises. Such a database would require a dedicated server and 1GB or more of RAM. These choices are highly dependent on the amount of memory, the speed of the computer, the size of the database details, the number of users accessing the database, and the number of users loading and accessing data into the database. The performance of the database may change as the number of databases and users increases.
according to their own situation, select a file configuration copy to my. Ini file, of course, you need to create your own, just create a new file, and then copy into the configuration information.
Read More:
- [error handling] when logging into MySQL with CentOS command, an error 1045 (28000) is reported
- Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- Error 1364 (HY000): field ‘SSL_ cipher’ doesn’t have a default value
- MySQL Access denied
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- Error 1045 (28000): solution to access denied for user ‘root’ @’localhost ‘(using password: no)
- MySQL error — multiple methods of failed to find valid data directory and MySQL setting password appear
- Error in exporting MySQL database from Linux mysqldump:got error :1045
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- MySQL appears: ERROR 1049 (42000): Unknown database’XXX’ solution
- ER_ACCESS_DENIED_ERROR: Access denied for user ‘root‘@‘localhost‘ (using password: NO)
- MySQL ERROR 1054 (42S22): Unknown column’password’ in’field list’ error
- Root password of windows 10 WSL Ubuntu system
- A case diagnosis and solution of DB2 error code 1639 and SQL state 08001 is described in detail
- 2059 error in connecting to database by Navicat premium
- Solution to MySQL Error 1130 problem
- Error code 1045, state 28000, Java sql.SQLException :Access denied for user ‘root’@’localhost’
- SQL Server import MDF and LDF files appear: unable to open physical file “D:\ XX.mdf “。 Operating system error 5: “5 (access denied. )”Solutions