1.安装apache2, php5, mysql-server-5.0, 3个主要的包。还有3个软件之间连接的包:
apache-mod-php5 , php5-mysql
php5-gd 这个包是什么用暂时不知道
phpmyadmin 是用来管理数据库的。


2.安装都是用apt-get 安装的。
phpmyadmin 默认安装在 /usr/share/phpmyadmin 中,
需要做个连接:ln -s /usr/share/phpmyadmin/ /var/www/
/etc/phpmyadmin/apache.conf 的 语句:
Anlas /phpmyadmin /usr/share/phpmyadmin
改为:
Anlas /phpmyadmin /var/www/phpmyadmin

 


3.samba 与 windos 文件共享。
samba 搭建:
apt-get install samba
apt-get install smbfs //这个应该是文件系统的

samba 用户必须是 linux 系统用户。所以,要先创建系统用户:
useradd smb_zgc -s /bin/false -d /home/smb_zgc /*这里 /bin/false 是让
其不能登录系统 */


samba 无法 安装, 安装后有配置文件,但是没有samba bin 文件。

 

 

 

 

 

 

 

 

 

msyql 操作除了赋权限给数据库以外,还有赋权限给 表,否则,无法对表执行
update,delete 等操作!!


mysql 不允许一次执行多条语句。尤其是delete 不能 用and 连接,只能一条一
条的删除。多条语句也不能连续执行。
一般操作:

问题解决:
1.不能连接数据库:
解决Mysql ERROR 1045 (28000)“Access denied for user
'root'@'localhost'”

[root@localhost ~]# /usr/local/mysql/bin/mysql -uroot -p password
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

解决:
[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
[root@localhost mysql]#/usr/local/mysql/ bin/mysql -u root mysql

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> update user set password=PASSWORD(123456) where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

[root@localhost mysql]# /usr/local/mysql/bin/mysql -uroot -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.50-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)


2.外面连接不上数据库,防火墙注意关掉。

posted on 2012-06-20 14:02  debugman  阅读(272)  评论(0编辑  收藏  举报