MySQL richtig konfigurieren

MySQL, PostgreSQL, SQLite
User avatar
rudelgurke
Posts: 405
Joined: 2008-03-12 05:36

Re: MySQL richtig konfigurieren

Post by rudelgurke » 2011-01-15 08:45

Hallo :)

Bitte folgendes:

/etc/init.d/mysql start && tail -n25 /var/lib/mysql/mysqld.log

Müsste er anzeigen womit MySQL zu kämpfen hat.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 10:43

Setze in der my.cnf bitte mal eine # vor skip-innodb und starte dann nochmal.
Welche my.cnf hast Du überhaupt bearbeitet? /etc/my.cnf oder /var/lib/mysql/my.cnf oder beide? Beide müssen den gleichen Inhalt haben.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

2Papeete
Posts: 18
Joined: 2011-01-09 23:17

Re: MySQL richtig konfigurieren

Post by 2Papeete » 2011-01-15 17:06

Habe die # vorgesetzt und sowohl /etc/my.cnf und /var/lib/mysql/my.cnf aktualisiert.

Dann habe ich es noch mal versucht, mit leider wieder nur folgendem Ergebnis:

Code: Select all

/etc/init.d/mysql status
Checking for service MySQL:                                          unused
h1603473:~ # /etc/init.d/mysql start
Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds
                                                                     done
h1603473:~ # /etc/init.d/mysql start && tail -n25 /var/lib/mysql/mysql.log
Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds
                                                                     done
tail: cannot open `/var/lib/mysql/mysql.log' for reading: No such file or directory

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 17:43

Es muss mysqld.log heissen, nicht mysql.log:

Code: Select all

tail -n 25 /var/lib/mysql/mysqld.log
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

2Papeete
Posts: 18
Joined: 2011-01-09 23:17

Re: MySQL richtig konfigurieren

Post by 2Papeete » 2011-01-15 19:55

Entschuldigt, jetzt also das Ergebnis:

Code: Select all

/etc/init.d/mysql start && tail -n25 /var/lib/mysql/mysqld.log
Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds
                                                                     done
110115 17:00:50  mysqld started
110115 17:00:50 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'

110115 17:00:50  mysqld ended

110115 17:02:58  mysqld started
110115 17:02:58 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'

110115 17:02:58  mysqld ended

110115 19:52:58  mysqld started
110115 19:52:58 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'

110115 19:52:58  mysqld ended


Was muss da anstatt mixed hin?

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 20:18

Die Zeile muss ganz raus, Du hast noch MySQL 5.0 und das kennt die Variable nicht.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

2Papeete
Posts: 18
Joined: 2011-01-09 23:17

Re: MySQL richtig konfigurieren

Post by 2Papeete » 2011-01-15 20:51

Habe Sie aus beiden my.cnf Dateien rausgenommen und versucht MySQL zu starten, ohne Erfolg, wieder nur diese Meldung leider.

/etc/init.d/mysql start
Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds
done

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 20:54

Was steht denn jetzt im Log?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

2Papeete
Posts: 18
Joined: 2011-01-09 23:17

Re: MySQL richtig konfigurieren

Post by 2Papeete » 2011-01-15 21:18

Wow, Steinlawinen purzeln :)

Habe es noch mal gestartet, dann kam erst das mit "unknown variable 'slow-query-log=1", habe die Zeile raus, dann "unknown variable 'slow-query-log-file=/var/lib/mysql/slow-query.log", habe die auch raus und jetzt gehts!!!!

Code: Select all

/etc/init.d/mysql start && tail -n25 /var/lib/mysql/mysqld.log
Starting service MySQL                                                done
110115 20:42:50  mysqld started
110115 20:42:50 [ERROR] /usr/sbin/mysqld: unknown variable 'slow-query-log=1'

110115 20:42:50  mysqld ended

110115 21:02:38  mysqld started
110115 21:02:38 [ERROR] /usr/sbin/mysqld: unknown variable 'slow-query-log=1'

110115 21:02:38  mysqld ended

110115 21:04:45  mysqld started
110115 21:04:45 [ERROR] /usr/sbin/mysqld: unknown variable 'slow-query-log=1'

110115 21:04:45  mysqld ended

110115 21:10:42  mysqld started
110115 21:10:42 [ERROR] /usr/sbin/mysqld: unknown variable 'slow-query-log-file=/var/lib/mysql/slow-query.log'

110115 21:10:42  mysqld ended

110115 21:13:17  mysqld started
110115 21:13:17 [Warning] options --log-slow-admin-statements and --log-queries-not-using-indexes have no effect if --log-slow-queries is not set
110115 21:13:17  InnoDB: Started; log sequence number 0 47420288
110115 21:13:17 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.51a-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  SUSE MySQL RPM


Was muss ich noch einstellen, um die Warnung wegzubekommen?

Vielen, vielen Dank schon mal!!

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 21:24

Füge die "slow-query-log-file"-Zeile bitte wieder dort ein wo sie war und ersetze "slow-query-log-file" mit "log-slow-queries". Die Variable wurde zwischen 5.0 und 5.1 umbenannt.
Last edited by Joe User on 2011-01-15 21:26, edited 1 time in total.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-15 21:28

Wenn dann Alles läuft, lässt Du es so zwei Tage laufen und postest dann die Ausgaben von mysqltuner.pl und tuning-primer.sh
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

2Papeete
Posts: 18
Joined: 2011-01-09 23:17

Re: MySQL richtig konfigurieren

Post by 2Papeete » 2011-01-18 04:06

Hier also nun das tuning-primer.sh Ergebnis nach dem MySQL wieder länger als 2 Tage läuft:

Code: Select all

-- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.51a-log x86_64

Uptime = 2 days 6 hrs 22 min 9 sec
Avg. qps = 14
Total Questions = 2848710
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 167185 out of 2848731 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled

WORKER THREADS
Current thread_cache_size = 24
Current threads_cached = 23
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 320
Current threads_connected = 1
Historic max_used_connections = 52
The number of used connections is 16% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 2 M
Current InnoDB data space = 2 M
Current InnoDB buffer pool free = 30 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 898 M
Configured Max Per-thread Buffers : 4.76 G
Configured Max Global Buffers : 106 M
Configured Max Memory Limit : 4.86 G
Physical Memory : 3.84 G

nMax memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 11 M
Current key_buffer_size = 32 M
Key cache miss rate is 1 : 17207
Key buffer free ratio = 67 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is enabled
Current query_cache_size = 64 M
Current query_cache_used = 39 M
Current query_cache_limit = 64 M
Current Query cache Memory fill ratio = 61.41 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 27610 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 4096 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 937 tables
You have 1024 open tables.
Current table_cache hit rate is 27%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 64 M
Current tmp_table_size = 64 M
Of 64606 temp tables, 33% were created on disk
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 52360 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of index                                                                              es.

TABLE LOCKING
Current Lock Wait ratio = 1 : 11
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-01-18 10:25

Das schaut doch schon deutlich besser aus. Nun änderst Du noch folgende drei Werte:

Code: Select all

open-files-limit                = 8192
table_cache                     = 2048
max_connections                 = 50

Die max_connections müssen auf 50, sonst frisst MySQL im ungünstigen Fall Deinen kompletten RAM und es geht dann überhaupt Nichts mehr.

Alles was danach noch lahmt, liegt dann an den schlecht programmierten Scripts nicht mehr am MySQL-Server.
Last edited by Joe User on 2011-01-18 10:29, edited 1 time in total.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2011-03-09 17:43

Beispiel-Konfiguration aktualisiert: viewtopic.php?t=36343
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

rootds
Posts: 5
Joined: 2012-10-04 22:09

Re: MySQL richtig konfigurieren

Post by rootds » 2012-10-04 22:28

Bitte helfen ich verstehe gar nicht mehr.

vserver3034:~ # rcmysql start
Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds

mysqld.log:
121004 20:19:23 mysqld ended

121004 20:19:24 mysqld started
121004 20:19:24 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'
121004 20:19:24 mysqld ended

121004 20:20:46 mysqld started
121004 20:20:46 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'
121004 20:20:46 mysqld ended

121004 20:28:28 mysqld started
121004 20:28:28 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'
121004 20:28:28 mysqld ended

121004 20:29:48 mysqld started
121004 20:29:48 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'
121004 20:29:48 mysqld ended

121004 20:38:53 mysqld started
121004 20:38:53 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog-format=MIXED'
121004 20:38:53 mysqld ended

121004 20:50:48 mysqld started
121004 21:07:52 mysqld started
121004 21:10:05 mysqld started
121004 21:14:07 mysqld started
121004 21:30:52 mysqld started
121004 21:58:02 mysqld started
121004 21:59:24 mysqld started
121004 21:59:24 [ERROR] Default storage engine (InnoDB) is not available
121004 21:59:24 [ERROR] Aborting

121004 21:59:24 [Note] /usr/sbin/mysqld: Shutdown complete

121004 21:59:24 mysqld ended

121004 22:03:09 mysqld started
121004 22:04:47 mysqld started
121004 22:16:34 mysqld started
121004 22:18:07 mysqld started


my.cnf:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
join_buffer_size = 2M
max_allowed_packet = 32M
max_heap_table_size = 64M
tmp_table_size = 64M
table_cache = 1024

sort_buffer_size = 2M
net_buffer_length = 8K
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
query_cache_limit = 16M
query_cache_size = 128M
query_cache_type = 1
long_query_time = 3
#skip-innodb
back_log = 50
sync_binlog = 1
binlog_cache_size = 1M
max_binlog_size = 100M

expire_logs_days = 7

log-slow-queries = /var/lib/mysql/slow-query.log
slave_compressed_protocol = 1
lower_case_table_names = 1
safe-user-create = 1
delay-key-write = ALL
myisam-recover = FORCE,BACKUP

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Disable Federated by default
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
# log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:1000M;ibdata2:10M:autoextend
innodb_flush_method = O_DIRECT
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 1G
innodb_thread_concurrency = 8
innodb_additional_mem_pool_size = 128M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 128M
innodb_log_buffer_size = 16M
innodb_flush_log_at_trx_commit = 2
innodb_log_files_in_group = 2
innodb_lock_wait_timeout = 120
innodb_max_dirty_pages_pct = 90

# The safe_mysqld script
[safe_mysqld]
log-error=/var/lib/mysql/mysqld.log

[mysqldump]
quick
quote_names
max_allowed_packet = 32M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 256M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log = /var/log/mysqld_multi.log
# user = multi_admin
# password = secret

# If you want to use mysqld_multi uncomment 1 or more mysqld sections
# below or add your own ones.

# WARNING
# --------
# If you uncomment mysqld1 than make absolutely sure, that database mysql,
# configured above, is not started. This may result in corrupted data!
# [mysqld1]
# port = 3306
# datadir = /var/lib/mysql
# pid-file = /var/lib/mysql/mysqld.pid
# socket = /var/lib/mysql/mysql.sock
# user = mysql

# [mysqld2]
# port = 3307
# datadir = /var/lib/mysql-databases/mysqld2
# pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid
# socket = /var/lib/mysql-databases/mysqld2/mysql.sock
# user = mysql

# [mysqld3]
# port = 3308
# datadir = /var/lib/mysql-databases/mysqld3
# pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid
# socket = /var/lib/mysql-databases/mysqld3/mysql.sock
# user = mysql

# [mysqld6]
# port = 3309
# datadir = /var/lib/mysql-databases/mysqld6
# pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid
# socket = /var/lib/mysql-databases/mysqld6/mysql.sock
# user = mysql


suse 11.1
confixx 3.3
PHP 5.2.14
MySQL 5.0.67
RAM 2048 MB
80 GB

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2012-10-04 23:06

Dein MySQL verwendet nicht die gepostete my.cnf sondern eine andere my.cnf. Diese musst Du finden und dann bearbeiten.


Unabhängig davon: Dein OpenSUSE 11.1 wird seit Januar 2011 nicht mehr unterstützt, weshalb Du es dringend auf eine unterstützte Version updaten musst.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

rootds
Posts: 5
Joined: 2012-10-04 22:09

Re: MySQL richtig konfigurieren

Post by rootds » 2012-10-05 05:57

Es geht doch um /etc/mysql/my.cnf oder?

MySQL Server startet nicht, was kann ich dagegen tun? ](*,)

Okay en Paar Minuten später - gestartet. :-D
Last edited by rootds on 2012-10-05 06:05, edited 1 time in total.

ddm3ve
Moderator
Moderator
Posts: 1186
Joined: 2011-07-04 10:56

Re: MySQL richtig konfigurieren

Post by ddm3ve » 2012-10-05 09:08

Nein, bei opensuse 11.1 liegt die my.cnf unter /etc/
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.

rootds
Posts: 5
Joined: 2012-10-04 22:09

Re: MySQL richtig konfigurieren

Post by rootds » 2012-10-05 14:27

Genau die habe ich gepostet.
Unter /etc gibt es bei mir überhaupt keinen mysql-Ordner.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2012-10-05 14:40

Die von Dir gepostete my.cnf passt aber nicht zu den Fehlermeldungen in Deinem Log. Liegt in /var/lib/mysql eventuell noch eine my.cnf oder wird im Initscript eine andere my.cnf referenziert?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

rootds
Posts: 5
Joined: 2012-10-04 22:09

Re: MySQL richtig konfigurieren

Post by rootds » 2012-10-05 15:00

also, in /var/lib/mysql gibt es keine my.cnf
ich verstehe nicht ganz, in welchem Initscript eine andere my.cnf referenziert?

ddm3ve
Moderator
Moderator
Posts: 1186
Joined: 2011-07-04 10:56

Re: MySQL richtig konfigurieren

Post by ddm3ve » 2012-10-05 15:19

Wie hast Du denn mysql Instaliert? Wurde ein Upgrade vorgenommen?
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2012-10-05 15:31

In dem Initscript für MySQL kann eine andere my.cnf angegeben sein, so dass nicht /etc/my.cnf verwendet wird.

Die Fehlermeldungen zum binlog-format und zur fehlenden InnoDB-Engine dürften mit der von Dir geposteten my.cnf nämlich nicht auftreten.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

rootds
Posts: 5
Joined: 2012-10-04 22:09

Re: MySQL richtig konfigurieren

Post by rootds » 2012-10-05 17:21

Ich habe mir einen VServer gemietet, auf dem schon alles installiert war.

Als ich /etc/my.cnf konfiguriert hatte, habe ich folgendes eingefügt:
default-storage-engine = InnoDB
binlog-format = MIXED
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/slow-query.log

danach habe ich mysql restart (/etc/init.d/mysql restart) gemacht.
Aber msql wollte nicht wieder starten und es wurde ausgegeben, das mysqld.sock fehlt.

Log File hat mir ausgegeben:
"unknown variable 'default-storage-engine=InnoDB"
"unknown variable 'binlog-format=MIXED"
"unknown variable 'slow-query-log=1"
"unknown variable 'slow-query-log-file=/var/lib/mysql/slow-query.log"
ich habe o.g. gelöscht und aus "slow-query-log-file" "log-slow-queries" gemacht.

Neustart und MySQL läuft.
In Status in phpMyAdmin InnoDB läuft mit.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL richtig konfigurieren

Post by Joe User » 2012-10-05 18:38

OK, dann ist das ja nun aufgeklärt.

Dennoch sei nochmals darauf hingewiesen, dass Dein OpenSUSE seit fast zwei Jahren nicht mehr mit Updates versorgt wird und dadurch mitlerweile zahlreiche schwere Sicherheitslücken hat.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.