8535.com-新浦京娱乐场官网|欢迎您

Linux mysql命令安装允许远程连接的安装设置方法

来源:http://www.dnamique.com 作者:计算机网络 人气:197 发布时间:2020-03-21
摘要:而这些东西,正是新手很困惑的地方。一下是我的安装笔记,在Centos虚拟机上安装成功。中文的参考:英文的参考How to Install MySQL 5.0 on Linux,How to Install PHP 5 on Linux ,Howto Install Apache

而这些东西,正是新手很困惑的地方。一下是我的安装笔记,在Centos虚拟机上安装成功。中文的参考:英文的参考 How to Install MySQL 5.0 on Linux,How to Install PHP 5 on Linux ,How to Install Apache 2 on Linux Linux 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目录 tar -zxvf cd --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 (apache/conf/)添加如下部分:LoadModule php5_module modules/libphp5.so AddType application/x- .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来添加访问权限 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重启即可远程访问

本文由8535.com-新浦京娱乐场官网|欢迎您发布于计算机网络,转载请注明出处:Linux mysql命令安装允许远程连接的安装设置方法

关键词:

最火资讯