lamp notebook
广告投放★自助友情CMS落伍广告联盟晒乐广告联盟脉动广告联盟品味广告联盟
广告位可自定样式联系QQ:38355018个文字广告月20元广告联系QQ:3835501广告位可自定样式
8个文字广告月20元黄金广告位每月20元广告位可自定样式联系QQ:3835501广告位可自定样式
左旋肉碱、全国包邮
买二送一、无效退款

文章浏览→编程相关Mysql→lamp notebook

lamp notebook
lamp notebook

 

MySql:

1.show the status of mysql:

/etc/init.d/mysqld status

2.run&stop mysql:

service mysqld start

service mysqld stop

3.install mysql:

only to do is tar the file and then move the file to/usr/local/mysql

4.pay attention to one mistake which is easy to make:

don't forget ";" at the end of every mysql command(except somecommand such as 'use database')

 

phpMyAdmin:

protect it and set a password:

Now, knowing what this cool program is capable of, its probablynot something you want just anyone to be able to access, luckily wecan take care of that very easily using Apache 's authenticationprocess, so lets do it !

Still as root make a directory to store the password file we willbe creating;

mkdir /usr/local/apache/passwd <enter>



Now, lets create the file and add an allowed user;

/usr/local/apache/bin/htpasswd -c /usr/local/apache/passwd/authpass myphp <enter>



htpasswd will prompt you for the password you would like to assignto this user, once entered, it will create the file authpass andpopulate it with the information for the user called myphp. You canuse whatever names you like, this is only an example.

Now the final step, change to your Apache configurationdirectory;

cd /usr/local/apache/conf <enter>



And again using your favorite editor, open the file namedhttpd.conf and find the following section;

<Directory />     Options FollowSymLinks     AllowOverride None  </Directory>



Directly under this section add the following (assuming you usedthe names from the example above);

<Directory "/usr/local/apache/htdocs/phpmyadmin">     AuthType Basic     AuthName "myphp"     AuthUserFile /usr/local/apache/passwd/authpass     Require user myphp  </Directory>



Thats it, save the file and close it, then restart Apache byissuing the following command;

/usr/local/apache/bin/apachectl restart <enter>

 

所属分类:编程相关Mysql    作者:新浪博客    时间:2010-11-20 0:00:00

文章导航