1. Download MySQL Community Server 5.5.43 Windows (x86, 64-bit), ZIP Archive.
(Link: http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.43-winx64.zip)
2. Extract the Zip Archive (mysql-5.5.43-winx64.zip) to C:\mysql-5.5.43-winx64\.
3. Rename C:\mysql-5.5.43-winx64\ to C:\mysql\.
4. Create a new directory C:\mydata\.
5. Copy the "data" folder from C:\mysql\ to C:\mydata\. Verify the contents in C:\mydata\data\ folder.
6. Create 3 bat files as below (with the inline contents) in C:\ Drive:
a. mysqld-start.bat
"C:\mysql\bin\mysqld" --console
b. mysql.bat
C:\mysql\bin\mysql -u root -p
c. mysqld-shutdown.bat
"C:\mysql\bin\mysqladmin" -u root -p shutdown
7. Create my.ini file (with the below inline contents) in C:\Windows\ folder:
[mysqld]
# set basedir to your installation path
basedir=C:/mysql
# set datadir to the location of your data directory
datadir=C:/mydata/data
8. START MySQL Server: Execute mysqld-start (6.a) using Command Prompt (Admin). Accept all the security prompts.
Below is the sample output:
...
150519 12:49:57 [Note] C:\mysql\bin\mysqld: ready for connections.
Version: '5.5.43' socket: '' port: 3306 MySQL Community Server (GPL)
TROUBLESHOOTING:
1. Delete all the files starting with ib* from C:\mydata\data\ folder.
2. Repeat the above step to start mysqld server.
9. START MySQL Shell: Execute mysql (6.b) using Command Prompt (Admin). Again accept all the security prompts.
Below is the sample output:
...
Enter password: [Press Enter] [By default the root password is blank]
...
Your MySQL connection id is 1
Server version: 5.5.43 MySQL Community Server (GPL)
...
mysql>
10. Change the password for root in mysql shell.
Execute the below:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');
...
mysql> quit;
TIP: Repeat Step 9 to login to the mysql shell with the new password for root
11. SHUTDOWN MySQL Server: Execute mysqld-shutdown (6.c) using Command Prompt (Admin).
Below is the sample output:
...
Enter password: [Press Enter] [Key in the new password for root]
12. Close all the open Command Prompt (Admin). Next time onwards login with the user Command Prompt.
---
Errors encountered in mysql-5.7.14:
mysqld: Table 'mysql.plugin' doesn't exist
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
C:\> mysqld --initialize --console
Initial Password:
[Note] A temporary password is generated for root@localhost: q0Mhltn.f:LT
---
No comments:
Post a Comment