Решил поставить себе сервер на Пингвина.
Установил apache, проверил nmap - 80 порт открыт.
Установил php. Набрал в консоли php --version - Вывел версию.
Все работает. Ставлю Mysql
Начались проблемы
Когда установил mysql и набрал в командой строке mysql вывел следующее:
Цитата:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Не может соединиться с сокетом по адресу /tmp/mysql.sock...
Гм...создал сначала файл, а затем и папку. Не помогло.
Заглянул в документацию. If you are using Unix and you want the MySQL socket file location to be somewhere other than the default location (normally in the directory `/tmp' or `/var/run'), use a `configure' command like this: shell> ./configure \ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock The socket filename must be an absolute pathname. You can also change the location of `mysql.sock' at server startup by using a MySQL option file. See *Note problems-with-mysql-sock::.
То есть сделал я все как надо. Сконфигурировал с помощью
./configure \ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
Но пользы это не принесло...
на какую ось сейчас mysql руками собирают? Ж)
и когда пишешь mysql у тя запускается клиент а не сервер пали маны как инициализировать базу и задать начальный пароль а потом man mysql и смотри строку про соксы как указать где они будут.
в 2 словах запусти сначала mysql сервер Ж)
[root@localhost mysql]# '/usr/local/mysql/bin/mysql_install_db'
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[1]+ Done /usr/local/mysql/bin/mysqld_safe
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost.localdomain' failed error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
видишь?
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
нахрена спрашивается писал грюже терь маны и опцию за соксы отвечающюю ищи или пересобирай заного
Ershik, ты просто запускаешь клиент без сервера, вот он и пишет, что невозможно открыть сокет. Установи себе mysql_server и mysql_devel, к дополнению мускулю. какая ОС у вас?