Introduction to MySQL installation, download, and login

Source: Internet
Author: User

The MySQL installation file has been widely used but is constantly updated. Here we will introduce how to set and use the MySQL Installation File to help you install and update the MySQL Installation File System. Configure MySQL under Fedora5 (MySQL documents of great reference include how to move the MySQL database location in the Linux File System)

1. Download the MySQL Installation File

To fully install MySQL, the following six files are required:
MySQL-server-community-5.1.26-0.rhel4.i386.rpm
MySQL-client-community-5.1.26-0.rhel4.i386.rpm
MySQL-shared-community-5.1.26-0.rhel4.i386.rpm
MySQL-devel-community-5.1.26-0.rhel4.i386.rpm
MySQL-test-community-5.1.26-0.rhel4.i386.rpm
MySQL-community-debuginfo-5.1.26-0.rhel4.i386.rpm

For: alias (because the Fedora version is not found, it is replaced by Redhat Enterprise 4, no problem), download all the required rpm files.

Ii. Install MySQL

The rpm file is a software installation package developed by Red Hat. rpm frees Linux from complicated procedures when installing software packages. The frequently used parameter of this command during installation is-ivh, where I indicates that the specified rmp package will be installed, and V indicates the detailed information during installation, h indicates that the "#" symbol appears during the installation to display the current installation process. This symbol will not stop until the installation is complete.

1) MySQL Server Installation
Run the following command in the directory with two rmp files: [root @ test1 local] # rpm-ivh MySQL-server *. rpm (* is a wildcard, saving a lot of input, which is very convenient -:)))
The following message is displayed: Failed dependencies: perl (DBI) is needed by MySQL-server-5.1.26-0.rhel4.i386 error!
Go to Google and find that there may be a lot of additional dependency checks added in this version of rpm, especially for all perl modules dependency checks, therefore, it is safe to use "-- nodeps" to force installation. I did this: rpm-ivh MySQL-server *. rpm -- nodeps; the result is successful:
Preparing... [100%]
1: MySQL-server [100%]

2) install the client in MySQL
Run the following command:
[Root @ test1 local] # rpm-ivh MySQL-client *. rpm
Preparing... [100%]
1: MySQL-client [100%]
There should be no problem with installing the other four rpm files above.

Iii. MySQL Logon

The MySQL logon command is mysql. the syntax of mysql is as follows: mysql [-u username] [-h host] [-p [password] [dbname] username and password are MySQL user names and passwords respectively, and mysql's initial management account is root, no Password. Note: This root user is not a Linux User. The default MySQL user is root. Because there is no password at first, you only need to type mysql for the first time.
[Root @ test1 local] # mysql
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql>
The prompt "mysql>" appears. Congratulations! The installation is successful!
The logon format after the password is added is as follows:
Mysql-u root-p
Enter password: (Enter the password)
-U is followed by the user name.-p requires the password. Press enter and enter the password at the Enter password.
However, an error occurred when I entered mysql:
The initial password is empty. Is it empty or incorrect!
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)

MySQL installation solution: reset the password
#/Etc/init. d/mysql stop
# Mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking &
# Mysql-u root mysql
Mysql> UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root ';
Mysql> flush privileges;
Mysql> quit
#/Etc/init. d/mysqld restart
# Mysql-uroot-p
Enter password:
Mysql> done!

  1. Install MySQL in the 9 ora 9 database
  2. Ubuntu mysql Installation server should be started automatically
  3. Ubuntu MySQL installation and configuration file
  4. Describe how to install Jdk and mysql in Open SUSE
  5. Operation notes: Install mysql in Linux

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.