MySQL 5 on Linux手动安装操作方案
以下的文章主要讲述的是MySQL 5 on Linux手动安装操作的具体方法,我们一共对其分成11部分,望你在浏览之后会对MySQL 5 on Linux手动安装操作有所收获,以下就是文章的具体操作内容。 1. MySQL 5 on Linux手动安装方法之一, 下载MySQL(和PHP搭配之最佳组合)
以下的文章主要讲述的是MySQL 5 on Linux手动安装操作的具体方法,我们一共对其分成11部分,望你在浏览之后会对MySQL 5 on Linux手动安装操作有所收获,以下就是文章的具体操作内容。
1. MySQL 5 on Linux手动安装方法之一,
下载"MySQL(和PHP搭配之最佳组合)-standard-5.0.27-linux-i686-icc-glibc23.tar.gz",推荐ICC版本,据称比GCC性能提高10-20%
2. 复制到/usr/local/,解压:
tar zxvf MySQL(和PHP搭配之最佳组合)-standard-5.x....tar.gz
3. 添加用户和组MySQL(和PHP搭配之最佳组合):
groupadd MySQL(和PHP搭配之最佳组合)
useradd -g MySQL(和PHP搭配之最佳组合) MySQL(和PHP搭配之最佳组合)
4. 创建符号连接:
/usr/local # ln -s MySQL(和PHP搭配之最佳组合)-standard-5.x... MySQL(和PHP搭配之最佳组合)
5. cd MySQL(和PHP搭配之最佳组合),当前目录改为/usr/local/MySQL(和PHP搭配之最佳组合)/
6. 运行脚步初始化数据库:
./scripts/MySQL(和PHP搭配之最佳组合)_install_db --user=MySQL(和PHP搭配之最佳组合)
7. 设置权限:
/usr/local/MySQL(和PHP搭配之最佳组合) # chown -R root .
/usr/local/MySQL(和PHP搭配之最佳组合) # chown -R MySQL(和PHP搭配之最佳组合) data
/usr/local/MySQL(和PHP搭配之最佳组合) # chgrp -R MySQL(和PHP搭配之最佳组合)
8. MySQL 5 on Linux手动安装过程中根据需要创建并修改/etc/my.cnf,参考配置:
[MySQL(和PHP搭配之最佳组合)d]
# 设置默认为INNODB表,支持事务:
default-storage-engine=INNODB
# 设置默认的字符集:
default-character-set=utf8
# 禁用bdb:
http://www.knowsky.com
skip-bdb
9. 启动MySQL(和PHP搭配之最佳组合):
/usr/local/MySQL(和PHP搭配之最佳组合)/bin # ./MySQL(和PHP搭配之最佳组合)d_safe --user=MySQL(和PHP搭配之最佳组合) &
10. 初始化root口令:
/usr/local/MySQL(和PHP搭配之最佳组合)/bin # ./MySQL(和PHP搭配之最佳组合)admin -u root -p password "password-of-root"
Enter password:
11. 以root登录创建数据库:
/usr/local/MySQL(和PHP搭配之最佳组合) # ./MySQL(和PHP搭配之最佳组合) -u root -p
Enter password: password-of-root
创建一个新用户:
MySQL(和PHP搭配之最佳组合)> create user test identified by 'test-password';
创建一个新数据库:
MySQL(和PHP搭配之最佳组合)> create database testdb;
赋予test用户从localhost访问testdb的权限:
MySQL(和PHP搭配之最佳组合)> grant all on testdb.* to test@localhost;
停止MySQL(和PHP搭配之最佳组合)服务器:
/usr/local/MySQL(和PHP搭配之最佳组合)/bin # ./MySQL(和PHP搭配之最佳组合)admin -u root -p shutdown
Enter password: password-of-root
STOPPING server from pid file /usr/local/MySQL(和PHP搭配之最佳组合)/data/debian.pid
xxx MySQL(和PHP搭配之最佳组合)d ended
以上的相关内容就是对MySQL 5 on Linux手动安装方法的介绍,望你能有所收获。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

VS Code supports Chinese settings, which can be completed by following the steps: Open the settings panel and search for "locale". Set "locale.language" to "zh-CN" (Simplified Chinese) or "zh-TW" (Traditional Chinese). Save settings and restart VS Code. The settings menu, toolbar, code prompts, and documents will be displayed in Chinese. Other language settings can also be customized, such as file tag format, entry description, and diagnostic process language.

Executing code in VS Code only takes six steps: 1. Open the project; 2. Create and write the code file; 3. Open the terminal; 4. Navigate to the project directory; 5. Execute the code with the appropriate commands; 6. View the output.
