LinuxForum.Fans
Тема

Arch: Настройка MySQL-Client

Автор: u_____________3 38 сообщений 8713 просмотров
#196706

newzenon написал:
Вот эта строка говорит нам что хост блокирует сканирование.
Ну ладно тогда...
#196799

При всем при том, это все более чем хорошо для халявного хостинга.

#196952

Вобщем поставил сервер и вроде бы все настроил.
На запуске повисает и позже выдает fail. И я даже не знаю в какую сторону смотреть.

#196955
враг системы написал:
Вобщем поставил сервер и вроде бы все настроил.
На запуске повисает и позже выдает fail. И я даже не знаю в какую сторону смотреть.

Без описания действий, ошибок..... конфигов... никто и не узнает. Где вопрос?

#196970

Где их искать хотя бы?
Говорю же, даже не знаю куда смотреть...

#196971
враг системы написал:
Где их искать хотя бы?
Говорю же, даже не знаю куда смотреть...

:

враг системы написал:
Вобщем поставил сервер и вроде бы все настроил.

Как, ставил, что настраивал.

враг системы написал:
На запуске повисает и позже выдает fail. И я даже не знаю в какую сторону смотреть.

Какой fail? не надо тут своими словами пересказывать, листинг из консоли выкладывай, а то как у бабки-гадалки.

#196974

newzenon написал:
Как, ставил, что настраивал.
По вики.

newzenon написал:
Какой fail? не надо тут своими словами пересказывать, листинг из консоли выкладывай, а то как у бабки-гадалки.
[console]:: Starting MySQL Server [FAIL] [/console]
#196977

По wiki когда ставил все ровно было?
root пароль на мускл установил?
Вывод покажи:
[console]# /etc/rc.d/mysql -v start[/console]
.
.

вот примерно в таком виде (у меня не arch запуск немного другой):

text
# /etc/init.d/mysql -v restart
mysql           | * Stopping mysql ...
mysql           | * Will stop /usr/sbin/mysqld
mysql           | * Will stop PID in pidfile `/var/run/mysqld/mysqld.pid'
mysql           | * Will stop processes of `/usr/sbin/mysqld'
mysql           | * Sending signal 15 to PID 16309 ...                                       [ ok ]
mysql           | * Starting mysql ...
mysql           | * Detaching to start `/usr/sbin/mysqld' ...
mysql           | * Waiting for /var/run/mysqld/mysqld.sock ...                              [ ok ]
#196984

newzenon написал:
# /etc/rc.d/mysql -v start
Не, у меня (в арче) нет опции -v.
[console]# /etc/rc.d/mysqld -v start
usage: /etc/rc.d/mysqld {start|stop|restart}[/console]

Ах, да, вот что забыл:
[console]# mysql_install_db --datadir=/var/lib/mysql --user=mysql

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

[/console]
#196986

Повтори установку мускула по https://wiki.archlinux.org/index.php/MySQL
_весь_ листинг сюда.
Иначе не понятно.
ы. Арча сейчас нет, проверить не могу, позже может на виртуалку накачу, если уж совсем никак.

#196991
text
[root@localhost alex]# pacman -Rns mysql
проверка зависимостей...

Удалить (3): mysql-5.5.16-1 net-tools-1.60-18 mysql-clients-5.5.16-1

Размер удаляемых файлов: 86,57 МБ

Хотите удалить эти пакеты? [Y/n] y (1/3) удаление mysql [############################] 100% (2/3) удаление net-tools [############################] 100% (3/3) удаление mysql-clients [############################] 100% [root@localhost alex]# pacman -S mysql разрешение зависимостей... проверка на взаимную несовместимость...

Цели (3): mysql-clients-5.5.16-1 net-tools-1.60-18 mysql-5.5.16-1

Размер загружаемых файлов: 0,00 МБ Размер устанавливаемых файлов: 86,57 МБ

Приступить к установке? [Y/n] y (3/3) проверяется целостность пакета [############################] 100% (3/3) проверка возможных конфликтов файлов [############################] 100% (1/3) установка mysql-clients [############################] 100% (2/3) установка net-tools [############################] 100% (3/3) установка mysql [############################] 100% 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/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h localhost password 'new-password'

Alternatively you can run: /usr/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/scripts/mysqlbug script!

Дополнительные зависимости для mysql perl-dbi perl-dbd-mysql [root@localhost alex]# /etc/rc.d/mysqld start A daemon is starting another daemon, this is unlikely to work as intended.\n :: Starting MySQL Server [DONE] [root@localhost alex]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here.

Enter current password for root (enter for none): OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

Remove anonymous users? [Y/n] y ... Success!

Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y ... Success!

By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.

Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success!

Reloading the privilege tables will ensure that all changes made so far will take effect immediately.

Reload privilege tables now? [Y/n] y ... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MySQL installation should now be secure.

Thanks for using MySQL!

[root@localhost alex]# /etc/rc.d/mysqld restart :: Stopping MySQL Server [DONE] A daemon is starting another daemon, this is unlikely to work as intended.\n :: Starting MySQL Server [DONE] [root@localhost alex]# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.5.16-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

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

mysql> CREATE DATABASE `wp`; Query OK, 1 row affected (0.01 sec)

mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | wp | +--------------------+ 4 rows in set (0.00 sec)

mysql> Bye [root@localhost alex]# /etc/rc.d/httpd restart :: Restarting Apache Web Server [DONE] [root@localhost alex]#

Это все?
Вордпресс не ставится, "Ошибка установки соединения с базой данных".

#197001

враг системы, ну вот запустился же. База wp это wordpress'а база?
Зачем создавал ее? Вроде ж надобыло слить с сервера?
Допустим есть слитая то заливать так:
[console]mysql -u root -p < /usr/share/mythtv/database/wp.sql[/console]
Дальше если ты создаешь новую базу, то немного не так, надо кому-то дать разрешения.

...
Вот пример http://linuxforum.ru/viewtopic.php?pid=212785#p212785
Создал база joomla, пользовател базы admin с паролем pass, листинг:

text
# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 813
Server version: 5.1.58-log Gentoo Linux mysql-5.1.58-r1

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> CREATE DATABASE joomla; Query OK, 1 row affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON joomla.* TO admin@localhost IDENTIFIED BY 'pass'; Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)

mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | drupal | | joomla | | mysql | | test | | wordpress | +--------------------+ 6 rows in set (0.00 sec)

mysql> EXIT; Bye #

Главное тут:
GRANT ALL PRIVILEGES ON joomla.* TO admin@localhost IDENTIFIED BY 'pass';
Имя базы joomla - у тебя wp - соответственно.
потом, если это чистая установка - в админке WP забиваешь пользователя admin с паролем pass
Или напрямую правишь wp-config.php

#197004

newzenon написал:
Вроде ж надобыло слить с сервера?
Та не надо... Зачем мне на локалхосте контент блога? Незачем.
Я WP сюда ставлю чтобы в нем, в самом ковыряться, ну и тему писать.

Сервер то запустился, видимо что-то не так делал (хотя вреде бы и все так)...
А вордпресс не ставится, и даже не знаю куда копать...

newzenon написал:
Главное тут:
GRANT ALL PRIVILEGES ON joomla.* TO admin@localhost IDENTIFIED BY 'pass';
Не понял. Что оно значит/дает и что под что подставлять (например еще у меня не admin а root)?
#197007

Та не надо...

3.2.8. Запрещено использовать методы ввода текста, усложняющие его восприятие: вносить намеренные ошибки или намеренно не соблюдать правила русского языка;

Внимательней.

#197012
враг системы написал:
Не понял.

Ты сделай как я сказал, а потом начинай установку WP, в полях заполни хост - localhost, имя базы, и пользователя с паролем которому сделал GRANT ALL PRIVILEGES

#197013

ы. Все это есть тут http://codex.wordpress.org/ru:Installing_WordPress

text
$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
 
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
  
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT Bye $

#197037

newzenon написал:
Ты сделай как я сказал, а потом начинай установку WP, в полях заполни хост - localhost, имя базы, и пользователя с паролем которому сделал GRANT ALL PRIVILEGES
Да сделал, не помогло...

Ну вот теперь опять...:
[console][root@localhost alex]# mysql -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)[/console]
Войдите или зарегистрируйтесь, чтобы ответить.