安裝Mysql 5.7 on fedora23 kde





depend: mecab  mecab-ipadic

大多數情況就是 運行下面這個命令,然後初始化mysql
sudo yum install mysql-community-{server,client,common,libs}-* 


資料來自mysql文檔

源網站


Installing and Upgrading MySQL

這個是一些安裝完之後msql的一些文件分佈

Table 2.9 MySQL Installation Layout for Linux RPM Packages from the MySQL Developer Zone(cp from http://dev.mysql.com/doc)

Files or Resources Location
Client programs and scripts /usr/bin
mysqld server /usr/sbin
Configuration file /etc/my.cnf
Data directory /var/lib/mysql
Error log file

For RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log

For SLES: /var/log/mysql/mysqld.log

Value of secure_file_priv /var/lib/mysql-files
System V init script

For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld

For SLES: /etc/init.d/mysql

Systemd service

For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld

For SLES: mysql

Pid file /var/run/mysql/mysqld.pid
Unix manual pages /usr/share/man
Include (header) files /usr/include/mysql
Libraries /usr/lib/mysql
Socket /var/lib/mysql/mysql.sock
Miscellaneous support files (for example, error messages and character set files) /usr/share/mysql


mysql 不會自動開啓服務,so 需要先打開一下mysqld
shell> service mysqld start
然後我們就可以在mysql相關日誌文件中搜索初始密碼啦,查看一下目錄,可以嘗試下面兩個命令
shell> grep 'temporary password' /var/log/mysqld.log
shell> grep 'temporary password' /var/log/mysql/mysqld.log
mysql -uroot -p  輸入所查詢到的密碼即可進入熟悉的mysql

At the initial start up of the server, the following happens, given that the data directory of the server is empty:

  • The server is initialized.

  • An SSL certificate and key files are generated in the data directory.

  • The validate_password plugin is installed and enabled.

  • A superuser account 'root'@'localhost' is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command for RHEL, Oracle Linux, CentOS, and Fedora platform:

    shell> grep 'temporary password' /var/log/mysqld.log
    

    Use the following command for SLES platform:

    shell> grep 'temporary password' /var/log/mysql/mysqld.log
    

    The next step is to log in with the generated, temporary password and set a custom password for the superuser account:

shell> mysql -uroot -p 
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; 
Note

MySQL's validate_password plugin is installed by default. This will require that passwords contain at least one upper case letter, one lower case letter, one digit, and one special character, and that the total password length is at least 8 characters.

If something goes wrong during installation, you might find debug information in the error log file /var/log/mysqld.log.

Compatibility with RPM Packages from Other Vendors. If you have installed packages for MySQL from your Linux distribution's local software repository, it is much preferable to install the new, directly-downloaded packages from Oracle using the package management system of your platform (yumdnf, orzypper), as described above. The command replaces old packages with new ones to ensure compatibility of old applications with the new installation; for example, the old mysql-libs package is replaced with the mysql-community-libs-compat package, which provides a replacement-compatible client library for applications that were using your older MySQL installation. If there was an older version of mysql-community-libs-compat on the system, it also gets replaced.

If you have installed third-party packages for MySQL that are NOT from your Linux distribution's local software repository (for example, packages directly downloaded from a vendor other than Oracle), you should uninstall all those packages before installing the new, directly-downloaded packages from Oracle. This is because conflicts may arise between those vendor's RPM packages and Oracle's: for example, a vendor's convention about which files belong with the server and which belong with the client library may differ from that used for Oracle packages. Attempts to install an Oracle RPM may then result in messages saying that files in the RPM to be installed conflict with files from an installed package.

Debug Package. A special variant of MySQL Server compiled with the debug package has been included in the server RPM packages. It performs debugging and memory allocation checks and produces a trace file when the server is running. To use that debug version, start MySQL with /usr/sbin/mysqld-debug, instead of starting it as a service or with /usr/sbin/mysqld. See Section 24.5.3, “The DBUG Package” for the debug options you can use.

Rebuilding RPMs from source SRPMs. Source code SRPM packages for MySQL are available from the MySQL Yum repository. They can be used as-is to rebuild the MySQL RPMs with the standard rpmbuild tool chain.

root passwords for pre-GA releases. For MySQL 5.7.4 and 5.7.5, the initial random root password is written to the .mysql_secret file in the directory named by the HOME environment variable. When trying to access the file, bear in mind that depending on operating system, using a command such as sudomay cause the value of HOME to refer to the home directory of the root system user . .mysql_secret is created with mode 600 to be accessible only to the system user for whom it is created. Before MySQL 5.7.4, the accounts (including root) created in the MySQL grant tables for an RPM installation initially have no passwords; after starting the server, you should assign passwords to them using the instructions in Section 2.10, “Postinstallation Setup and Testing”."


( ¯(∞)¯ )祝小夥伴們,成功安裝,並進入mysql~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章