"unknown variable 'max_connections=75'" when trying to start mysql

My linode is Ubuntu 15.10 linode 1024.

I have very limited knowledge about setting up LAMP environment, so I could only blindly follow the https://www.linode.com/docs/websites/hosting-a-website. I just finished step 5 in "Optimizing MySQL for a Linode 1GB". When I tried to proceed to the next step and start mysql to create database, I got this error message:"unknown variable 'max_connections=75'".

Here is the content of my "my.cnf":

#
# 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
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * 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/
!includedir /etc/mysql/mysql.conf.d/
#### Added by me #####
[mysql]
max_connections = 75
max_allowed_packet = 1M
thread_stack = 128K
table_open_cache = 32M
key_buffer_size = 32M

Anything below "Added by me" comment line didnt' exist before I modified the file. I checked my mysql verysion, it is 5.6+, and I was able to login mysql before I modified the my.conf file.

Apparenly the problem lies in the '[mysql]' block, but what is wrong?

2 Replies

I am pretty sure [mysql] should be [mysqld]

@jeremye77:

I am pretty sure [mysql] should be [mysqld]

Thank you it works. Doesn't linode need to update their tutorial…

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct