Install MySQL in Ubuntu

Source: Internet
Author: User
Installing MySQL in Ubuntu saves a lot of trouble. Basically, I sorted out the online materials. 1. install MySQLsudoapt-getinstallmysql-servermysql-client # You will be asked to enter the root user password sudoapt-Ubuntu once to install MySQL. I use the online installation method, saving a lot of trouble. Basically, I sorted out the online materials.

1. Install MySQL
  1. Sudo apt-get install mysql-server mysql-client # You will be asked to enter the root user password once in the middle
 
  1. Sudo apt-get install php5-mysql # installation php5-mysql is to connect php and mysql
After the installation is complete, the MySQL server should have started up. Manual start method:
  1. Sudo start mysql # start it manually
 
  1. Sudo stop mysql # manually stop
After you modify the configuration file, you need to restart mysqld to make these changes take effect.

To check whether the mysqld process is enabled, run the following command:
  1. Pgrep mysqld
If the process is enabled, the command returns the id of the process.

Go to MySQL
  1. Mysql-uroot-p
After entering the MySQL root Password, you can see the following results:
  1. Hadoop@ Ubuntu:~ $ Mysql-uroot-p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with; or \ g.
  4. Your MySQL connection id is62
  5. Server version:5.1.41-3ubuntu12.10(Ubuntu)
  6. Type'Help ;'Or'\ H' ForHelp. Type'\ C'To clear the current input statement.
  7. Mysql>
2. Install phpmyadmin
Install apache, a web server that supports PHP, and download and install phpmyadmin to manage the MySQL database on the web end.
1) install apache2
  1. Sudo apt-get install apache2
2) install PHP5 and Apache PHP5 modules
  1. Sudo apt-get install php5 libapache2-mod-php5
Restart Apache
  1. Sudo/etc/init. d/apache2 restart
3) install phpmyadmin
  1. Sudo apt-get install phpmyadmin
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.