Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

character-set-server and mysql's config file

Tags:

mysql

utf-8

I am running mysql -u root -p (on Ubuntu 12.05), and I keep on getting this error message:

mysql: unknown variable 'character-set-server=utf8'

Indeed in my my.cnf file I set it up because I had a message occurring when setting default-set-server=utf8 which is now deprecated. Here's my my.cnf file:

[client]
  port            = 3306
  socket          = /var/run/mysqld/mysqld.sock
  character-set-server = utf8
[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
  skip-external-locking
  collation-server = utf8_unicode_ci
  character-set-server = utf8
  init-connect='SET NAMES utf8'

Could anybody help?

like image 201
user1611830 Avatar asked Nov 25 '12 15:11

user1611830


1 Answers

you need to remove character-set-server = utf8 under client you already have one for in [mysqld] and make sure to restart the SID after changing the cnf file

like image 104
Ahmad Abuhasna Avatar answered Sep 21 '22 02:09

Ahmad Abuhasna