MYSQL is the world's most popular open source database. Installing it is quite easy but people usually use the default installation and it makes the database easy to be detected. Personally, I think it is not bad but I prefer using the no-install mysql. Using it makes you in control on the location of the data it stores and other things like logs and others.
Now I will teach you how to use the mysql no-install and show how you can customize its storage location on your own. You can use the following procedures:
1. First of all, download the mysql no-install zip file here.
2. Unzip the file and rename the folder anything you want. (I'll rename the folder mysql.)
3. Then place the folder to any location you want. (I'll put mine in drive D: so the directory is D:\mysql.)
4. If you want to control the location of the data create a folder you want the data to be place.(I'll name my folder mydata and place it in the drive D so my directory for the data will be D:\mydata.)
5. Go to the mysql folder and copy the data folder and paste it in the mydata folder.
6. Then to customize the directory of the data open a notepad and write these according to your directory:
[mysqld]
basedir="D:\mysql"
datadir="D:\mydata\data"
7. Save this as my.ini and place it in the Windows folder.
Now to access mysql follow these procedures:
1. Open a command prompt.
2. Open the directory of mysql\bin. I'll be using these commands:
d:
cd mysql\bin
3. To open a server use this command: (add your password after the root if you have one)
mysqld -u root
4. Now you have a server open another command prompt and like the procedure above go to the mysql\bin directory.
5. To access mysql use this command: (add your password after the root if you have one)
mysql -u root
6. To close the server exit mysql and use this command:
mysqladmin -u root shutdown
Now that ends our tutorial. You can now discover everything else on your own. Using the my.ini file, you have the control on your mysql. Goodluck!
Thanks bro
ReplyDeleteThis comment has been removed by the author.
ReplyDelete