Document reference http://www.jb51.net/article/83365.htm
There are a lot of instructions on the Internet, but there are some details that don't explain it, and it takes a lot of time to get it.
If you encounter ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)
alter
user
‘root‘
Please @
try ‘localhost‘
it identified
first by
.‘12345‘
; 12345 是你的密码;
If not, continue to see below.
1, download the decompression MySQL, no longer repeat.
2. Find My-default.ini copy in unzip file, rename My.ini
3. Content in the My.ini file
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql\mysql-winx64
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\mysql-winx64\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
Note: Basedir and DataDir are your own decompression positions.
4. Go to Bin directory via command line
C:\windows\system32>d:
D:\>CD D:\mysql\mysql-winx64\bin
5. Run code mysqld--initialize-insecure--user=mysql
Example d:\mysql\mysql-winx64\bin>mysqld--initialize-insecure--user=mysql
6. Start the service run net start MySQL or go to service management to start
7. Change the root password
mysql -u root -p
mysql>use mysql;
mysql>
update
user
set
authentication_string=
password
(
‘12345‘
)
where
user
=
‘root‘
and
Host =
‘localhost‘
;
mysql>
alter
user
‘root‘
@
‘localhost‘
identified
by
‘12345‘
;
mysql> FLUSH
PRIVILEGES
;
mysql> QUIT
Note: Notice the red place above.
MySQL Free install version configuration