Getting started with MySQL is really easy. First you want to install the mysql server. Then you can start the server with this command:
Then, because intially the root user has no password, we want to set the password like this:
You can now login to the mysql server with this:
You'll need to type in the password that you entered earlier.
Every new MySQL install has 2 databases: mysql and test. Do NOT screw up your mysql database because here is where all the permission and user info is. The test DB is for you to play around with. As was mentioned earlier the MySQL documentation is excellent. That's the main reason I prefer it over the other 2 mentioned above (maybe their docs are better nowadays.) You'll probably want to set up a new user next. The MySQL docs can help you there.
You mentioned that you're familiar with SQL, so you should be able to play around now.
Chris
Code:
sudo /etc/init.d/mysql start
Code:
mysqladmin -u root password myPassword
Code:
mysql -u root -p
Every new MySQL install has 2 databases: mysql and test. Do NOT screw up your mysql database because here is where all the permission and user info is. The test DB is for you to play around with. As was mentioned earlier the MySQL documentation is excellent. That's the main reason I prefer it over the other 2 mentioned above (maybe their docs are better nowadays.) You'll probably want to set up a new user next. The MySQL docs can help you there.
You mentioned that you're familiar with SQL, so you should be able to play around now.
Chris
本文介绍MySQL的安装及基本使用方法,包括启动服务器、设置root用户密码、登录服务器等步骤,并提醒不要修改mysql数据库,以免影响权限设置。
1229

被折叠的 条评论
为什么被折叠?



