Linux mysql命令安装允许远程连接的安装设置方法
对大家推荐很好使用的Linux mysql系统,像让大家对Linux mysql系统有所了解,然后对Linux mysql系统全面讲解介绍,希望对大家有用今天特意配置了mysql apache php ,虽然网上很多这方面的例子,但是很多是作者再回忆写的,所以难免有笔误的地方。
而这些东西,正是新手很困惑的地方。一下是我的安装笔记,在Centos虚拟机上安装成功。中文的参考:http://xieyu.blog.51cto.com/213338/59749英文的参考 How to Install MySQL 5.0 on Linux,How to Install PHP 5 on Linux ,How to Install Apache 2 on LinuxLinux mysqlapache php 安装过程。将apache ,mysql ,php 的tar.gz 文件复制到/home/tmp目录。接着执行下面的命令
Linux mysql 安装
cd /home/tmp groupadd mysql useradd -g mysql mysql tar -zxvf mysql-5.1.33.tar.gz cd mysql-5.1.33 ./configure --prefix=/usr/local/mysql make make install cd /usr/local/mysql chown -R root . bin/mysql -u root -p chgrp -R mysql .(注意有个.) cd /home/tmp cd mysql-5.1.33 ln -s /usr/local/mysql/ /usr/local/mysql cp support-files/my-small.cnf /etc/my.cnf 修改my.cnf 在[sqld]下面添加user=mysql. chown root /etc/my.cnf chgrp root /ect/my.cnf chmod 644 /etc/my.cnf /usr/local/mysql/bin/mysqld_safe --user=mysql & cp support-files/mysql.server /etc/init.d/mysql chmod 755 /etc/init.d/mysql chkconfig --add mysql chkconfig --level 35 mysql on /usr/local/mysql/bin/mysql_install_db --user=mysql /usr/local/mysql/bin/mysql -u root(如果能进入mysql 命令行,说明mysql 配置成功。) edit /etc/my.cnf
[client] + default-character-set=utf8 [mysqld] + default-character-set=utf8 [mysql] + default-character-set=utf8
apache安装,请先进入/home/tmp目录(cd /home/tmp) tar -zxvf httpd-2.2.13.tar.gz cd httpd-2.2.13./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-auth-digest=shared --enable-ssl --enable-deflate make history make install cp /usr/local/apache2/bin/apachectl /etc/init.d chmod 755 /etc/init.d/apachectl /usr/local/apache2/bin/apachectl start php的安装 cd /home/tmp tar -xzf php-5.3.0.tar.gz cd php-5.3.0 ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-pdo-mysql \ --with-zlib \ --with-libxml-dir \ --with-xsl \ --enable-mbstring \ --enable-zend-multibyte \ --enable-sockets \ --enable-soap \ --enable-zip
Linux mysql
make install修改apache httpd.conf(apache/conf/httpd.conf)添加如下部分:LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php
cp php.ini-development /usr/local/php/lib/php.ini /usr/local/apache2/bin/apachectl start /usr/local/apache2/bin/apachectl stop /usr/local/apache2/bin/apachectl start 附:Linux mysql 允许远程连接
/usr/local/mysql/bin/mysql -u root -p (进入mysql) use mysql; SELECT `Host`,`User` FROM user; UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1; flush privileges; 注意在mysql 命令行形式下一定要输入";". v经过configure就可以make了
Linux mysql
make install注意pdo_mysql的全路径,我的是:
/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
然后在/usr/local/lib/php.ini
加上一句:
extension=/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
重新启动apache即可看到已经加载pdo_mysql成功。
在ubuntu7.10中mysql安装,默认是只能本机访问的,需要打开用户权限和mysql的本机绑定
1、在命令行底下打开用户权限:grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';
在管理员界面可以通过用户管理add host->any host来添加访问权限(root用户默认只能访问本机,新添加的用户可远程)
2、取消mysql本机绑定:
编辑/etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
将”bind-address = 127.0.0.1“注释
sudo /etc/init.d/mysql restart重启即可远程访问

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

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.
