Nie mog

Tematy związane z oprogramowaniem, instalacją, konfiguracją
Awatar użytkownika
grzesiek
Junior Member
Posty: 932
Rejestracja: 06 stycznia 2008, 10:41
Lokalizacja: Białystok

Post autor: grzesiek »

A pokaż konfig i w między czasie spróbuj bez podawania hasła np.

Kod: Zaznacz cały

mysqladmin -u root
mysqladmin -u root password
mysqladmin -u root -p
Ale przedewszystkiem sprawdz czy mysql dziła

Kod: Zaznacz cały

ps -A | grep mysql
Nic nie zmieniałeś w localhost=127.0.0.1?
dsue
Posty: 21
Rejestracja: 07 czerwca 2008, 18:17
Lokalizacja: Pabianice

Post autor: dsue »

Napisz co ci daje komenda: ps ax|grep mysql

i nie uruchamiałbym mysqla przez mysqld tylko /etc/init.d/mysql start (albo restart)

Pozdrawiam
MaestroS
Posty: 48
Rejestracja: 11 maja 2007, 19:19
Lokalizacja: Universe

Post autor: MaestroS »

ps -A | grep mysql

Kod: Zaznacz cały

4879 ?        00:00:00 mysqld_safe
 4918 ?        00:00:01 mysqld
ps ax | grep mysql
4879 ? S 0:00 /bin/sh /usr/bin/mysqld_safe
4918 ? Sl 0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
4919 ? S 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
12683 pts/0 S+ 0:00 grep mysql
mysqladmin -u root

Kod: Zaznacz cały

ks23098:~# mysqladmin -u root
mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
  -c, --count=#       Number of iterations to make. This works with -i
                      (--sleep) only.
  -#, --debug[=name]  Output debug log. Often this is 'd:t :o ,filename'.
  -f, --force         Don't ask for confirmation on drop database; with
                      multiple commands, continue even if an error occurs.
  -C, --compress      Use compression in server/client protocol.
  --character-sets-dir=name
                      Directory where character sets are.
  --default-character-set=name
                      Set the default character set.
  -?, --help          Display this help and exit.
  -h, --host=name     Connect to host.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty. WARNING: Providing a
                      password on command line is insecure as it is visible
                      through /proc to anyone for a short time.
  -P, --port=#        Port number to use for connection.
  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
  -r, --relative      Show difference between current and previous values when
                      used with -i. Currently works only with extended-status.
  -O, --set-variable=name
                      Change the value of a variable. Please note that this
                      option is deprecated; you can set variables directly with
                      --variable-name=value.
  -s, --silent        Silently exit if one can't connect to server.
  -S, --socket=name   Socket file to use for connection.
  -i, --sleep=#       Execute commands again and again with a sleep between.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags). Disable with --skip-ssl.
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-verify-server-cert
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  -u, --user=name     User for login if not current user.
  -v, --verbose       Write more information.
  -V, --version       Output version information and exit.
  -E, --vertical      Print output vertically. Is similar to --relative, but
                      prints output vertically.
  -w, --wait[=#]      Wait and retry if connection is down.
  --connect_timeout=#
  --shutdown_timeout=#

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
count                             0
force                             FALSE
compress                          FALSE
character-sets-dir                (No default value)
default-character-set             (No default value)
host                              (No default value)
port                              3306
relative                          FALSE
socket                            /var/run/mysqld/mysqld.sock
sleep                             0
ssl                               FALSE
ssl-ca                            (No default value)
ssl-capath                        (No default value)
ssl-cert                          (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-verify-server-cert            FALSE
user                              root
verbose                           FALSE
vertical                          FALSE
connect_timeout                   43200
shutdown_timeout                  3600

Default options are read from the following files in the given order:
/etc/mysql/my.cnf ~/.my.cnf /usr/etc/my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit
--no-defaults           Don't read default options from any options file
--defaults-file=#       Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Where command is a one or more of: (Commands may be shortened)
  create databasename   Create a new database
  debug                 Instruct server to write debug information to log
  drop databasename     Delete a database and all its tables
  extended-status       Gives an extended status message from the server
  flush-hosts           Flush all cached hosts
  flush-logs            Flush all logs
  flush-status          Clear status variables
  flush-tables          Flush all tables
  flush-threads         Flush the thread cache
  flush-privileges      Reload grant tables (same as reload)
  kill id,id,...        Kill mysql threads
  password new-password Change old password to new-password, MySQL 4.1 hashing.
  old-password new-password Change old password to new-password in old format.

  ping                  Check if mysqld is alive
  processlist           Show list of active threads in server
  reload                Reload grant tables
  refresh               Flush all tables and close and open logfiles
  shutdown              Take server down
  status                Gives a short status message from the server
  start-slave           Start slave
  stop-slave            Stop slave
  variables             Prints variables available
  version               Get version info from server
I działa.
Awatar użytkownika
grzesiek
Junior Member
Posty: 932
Rejestracja: 06 stycznia 2008, 10:41
Lokalizacja: Białystok

Post autor: grzesiek »

A config?
MaestroS
Posty: 48
Rejestracja: 11 maja 2007, 19:19
Lokalizacja: Universe

Post autor: MaestroS »

Chyba nie trudno się domyślić, że w ogóle go nie ruszałem, jest domyślny, ale cóż ...

Kod: Zaznacz cały

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# [url]http://dev.mysql.com/doc/mysql/en/server-system-variables.html[/url]

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
#
# 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
#
# * Fine Tuning
#
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover          = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log            = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries       = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                        = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
Awatar użytkownika
grzesiek
Junior Member
Posty: 932
Rejestracja: 06 stycznia 2008, 10:41
Lokalizacja: Białystok

Post autor: grzesiek »

Pokaż wynik polecenie

Kod: Zaznacz cały

netstat -ltnp | grep :3306
oraz

Kod: Zaznacz cały

ls /var/run/mysqld/ | grep mysqld.sock
oraz

Kod: Zaznacz cały

cat /etc/hosts | grep localhost
Sprawdz czy MySQL uruchomi się gdy zakomentujesz opcję

Kod: Zaznacz cały

bind-address  = 127.0.0.1 
Z tego co widzę to masz logi wyłączone, odkomentuj opcję

Kod: Zaznacz cały

#log = /var/log/mysql/mysql.log 
spróbuj ustawić hasło roota i pokaż logi.

Na razie to wszystko co mi przychodzi do głowy. Zostaje jeszcze zrestartować kompa (ale to już na pewno robiłeś), a nawet zostawić to do jutra, może jutro zacznie działać ;-) kto wie.
MaestroS
Posty: 48
Rejestracja: 11 maja 2007, 19:19
Lokalizacja: Universe

Post autor: MaestroS »

netstat -ltnp | grep :3306

Kod: Zaznacz cały

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      4918/mysqld
ls /var/run/mysqld/ | grep mysqld.sock

Kod: Zaznacz cały

mysqld.sock
cat /etc/hosts | grep localhost

Kod: Zaznacz cały

127.0.0.1       localhost.localdomain localhost
::1     ip6-localhost ip6-loopback

Poza tym, MySQL działa, widać w procesach. A co do tego logu, to próbowałem zmienić hasło i:

Kod: Zaznacz cały

                    24 Quit
                     25 Connect     debian-sys-maint@localhost on
                     25 Query       select @@version_comment limit 1
                     25 Query       select count(*) into @discard from `mysql`.`time_zone_transition`
                     25 Quit
                     26 Connect     debian-sys-maint@localhost on
                     26 Query       select @@version_comment limit 1
                     26 Query       select count(*) into @discard from `mysql`.`time_zone_transition_type`
                     26 Quit
090105 22:02:41      27 Connect     debian-sys-maint@localhost on
                     27 Query       select @@version_comment limit 1
                     27 Query       select count(*) into @discard from `mysql`.`user`
                     27 Quit
090105 22:02:53      28 Connect     Access denied for user 'root'@'localhost' (using password: NO)
090105 22:03:05      29 Connect     Access denied for user 'root'@'localhost' (using password: NO)
Awatar użytkownika
grzesiek
Junior Member
Posty: 932
Rejestracja: 06 stycznia 2008, 10:41
Lokalizacja: Białystok

Post autor: grzesiek »

Nie wiem co jest grane. Ale po głowie chodzi mi coś takiego, że może paczka jest walnięta albo się źle ściągneła. Czy przed ponownym zainstalowaniem wyczyściłeś cacha apt? Bo on przechowuje paczki już raz pobrane. może Wyczyść te jego cacha i jeszcze raz spróbuj - jak masz jeszcze siły.
MaestroS
Posty: 48
Rejestracja: 11 maja 2007, 19:19
Lokalizacja: Universe

Post autor: MaestroS »

Nieaktualne.
ODPOWIEDZ