Rethat Linux Fedora17 源码安装mysql
1.fedora17系统和mysql-5.1.58.tar.gz下载 linux系统redhat fedora17 Gonme 系统下载地址: http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/i686/Fedora-17-i686-Live-Desktop.iso mysql-5.1.58.tar.gz下载: http://download.csdn.n
1.fedora17系统和mysql-5.1.58.tar.gz下载
linux系统redhat fedora17 Gonme
系统下载地址:http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/i686/Fedora-17-i686-Live-Desktop.iso
mysql-5.1.58.tar.gz下载:http://download.csdn.net/download/monster1/4565198
切换到root用户:
#su
2.新建用户和用户组
#groupadd mysql
#useradd -g mysql mysql
3.安装必要的软件,如果已经安装请跳过。
安装C编译器:
#yum -y install gcc
安装C++编译器:
#yum -y install gcc-c++
安装ncurses
#yum -y install ncurses-devel
找不到的情况下
#yum list|grep ncurses
在给出的列表中选择一个
#yum instal ncurses-devel.XX.XX
安装libtool
#yum -y install libtool
#autoreconf --force --install
#libtoolize --automake --force
#automake --force --add-missing
4.安装mysql-5.1.58.tar.gz
创建mysql目录
#mkdir /usr/local/mysql
解压文件到当前目录
#tar -xzvf mysql-5.1.58.tar.gz
移动文件到/usr/src/mysql
#mv mysql-5.1.58 /usr/src/mysql
到mysql的目录/
#cd /usr/src/mysql
配置mysql
#./configure --prefix=/usr/local/mysql
配置时会报一个错误:/usr/bin/rm: cannot remove 'libtoolT': No such file or directory
#vi configure
查找cfgfile
注释掉 $RM "$cfgfile"
推出保存:wq
重新#./configure --prefix=/usr/local/mysql
#make
#make install
5.给mysql目录设定root权限
#cd /usr/local
#chown -R mysql:mysql mysql
6.初始数据安装
#cd /usr/local/mysql/bin
#./mysql_install_db --user=mysql
安装后会在/usr/local/mysql/var/下面产生mysql,test两个文件目录,需要再设置权限
#cd /usr/local
#chown -R mysql:mysql mysql
#./mysqld_safe --user=mysql
登陆mysql
#./mysql -u root -p
出现下面的就是OK了
mysql>
7.以后使用下面的命令,启动、停止和重启服务
#cd /usr/local/mysql/share/mysql
启动
#./mysql.server start
停止
#./mysql.server stop
重启
#./mysql.server restart
8.远程访问mysql设置
mysql默认只能本机访问,如果需要其他机器远程访问,需要设置。
第一步:增加一个用户,用来进行远程登陆。
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘test’@'%’ IDENTIFIED BY 'test' WITH GRANT OPTION;
※:用户名为test,密码为test,其中的”%”表示所有机器都可以访问,重新启动mySql生效
第二步:用户增加完后,在本机上可以用命令来测试,登陆mySql成功说明设置OK。
mysql -h -u myuser -p
第三步:最重要一点,你这个时候会发现,在本机器上可以连接mySql,但是在其他机器上用相同方法,会出现
”Can’t connect to MySQL server on ’9.186.100.178′ (10065)”的错误.分析原因是防火墙导致。
用下面方法设置防火墙:打开文件/etc/sysconfig/iptables,在最后一条之前加一条:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT.
下次启动会生效
也可直接关闭防火墙: /etc/init.d/iptables -F
现在,您就可以在其他的机器上用MySql的client端访问该数据库了,登陆方法还是”mysql -h 192.168.1.3 -u myuser -p”.
但如果总用这个控制台管理总不爽,建议用一些管理软件管理就很不错了,本人用的是HeidiSQL,很不错的软件.
9.大小写敏感消除
编辑/etc/my.cnf
在[mysqld]下追加
lower_case_table_names = 1
然后重启mysql
10.至此mysql的源码安装结束

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

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.

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 available on Mac. It has powerful extensions, Git integration, terminal and debugger, and also offers a wealth of setup options. However, for particularly large projects or highly professional development, VS Code may have performance or functional limitations.

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.

How to back up VS Code configurations and extensions? Manually backup the settings file: Copy the key JSON files (settings.json, keybindings.json, extensions.json) to a safe location. Take advantage of VS Code synchronization: enable synchronization with your GitHub account to automatically back up all relevant settings and extensions. Use third-party tools: Back up configurations with reliable tools and provide richer features such as version control and incremental backups.
