Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Server charset" in "Database server" tab showing wrong information. #15059

Closed
ghost opened this issue Mar 21, 2019 · 6 comments
Closed

"Server charset" in "Database server" tab showing wrong information. #15059

ghost opened this issue Mar 21, 2019 · 6 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@ghost
Copy link

ghost commented Mar 21, 2019

I'm new here. I got a little confuse so please be kind.

In /etc/mysql/mariadb.cnf I changed:

[mysqld]
character_set_server = utf8mb4
collation_server = utf8mb4_unicode_ci 

into:

[mysqld]
character_set_server = latin1
collation_server = latin1_swedish_ci

and restarted sudo systemctl restart mariadb. I also did a Ctrl+F5 refresh on the page but it is still showing the old/wrong information:

Server charset: UTF-8 Unicode (utf8)

Is this information being cache somewhere? When I go to the "Databases" tab, it is showing the correct updated default collation which is latin1_swedish_ci. Isn't the informatoin should now be showing "Server charset: something something (latin1)" instead of "Server charset: UTF-8 Unicode (utf8)"

@apoorvkhare07
Copy link
Contributor

@sudoranger did you try the same in incognito/private window ? As caching might be the issue here.

@ghost
Copy link
Author

ghost commented Mar 23, 2019

I checked with incognito but it still the showing the wrong information. I also reinstall mariadb and a fresh phpmyadmin 4.8.5 on another machine,

# /etc/mysql/mariadb.cnf

[client]
default-character-set = utf8mb4

[mysqld]
character_set_server = utf8mb4
collation_server = utf8mb4_unicode_ci

!includedir /etc/mysql/mariadb.conf.d/

Restarted the mysql service and this is what I got:

Screenshot from 2019-03-23 17-44-54

As you can see, I'm using ut8mb4 but it is showing UTF-8 is this normal? So, I changed back to latin1 and restarted the service and ctrl+refresh, deleted all cookies/temporary files from the latest Chrome 73 (official Google repo), but it is still showing "Server charset: UTF-8 Unicode (utf8)". Isn't it supposed to change to something like Latin1 Swedish (latin1) or something like that?

/etc/mysql$ sudo mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.4.3-MariaDB-1:10.4.3+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> SHOW VARIABLES LIKE  'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.002 sec)

I came across this article. It says,

As you can see, all the relevant options are set to utf8mb4, except for character_set_filesystem which should be binary unless you’re on a file system that supports multi-byte UTF-8-encoded characters in file names, and character_set_system which is always utf8 and can’t be overridden.

Is it perhaps "Server charset" is actually showing the information for "System charset" instead?

@apoorvkhare07
Copy link
Contributor

@sudoranger No, Actually I found the issue. actually the charset is hardcoded as utf-8 in the code.
@williamdes How do we plan to resolve this ? Is there some specific reason that it is hardcoded ? Or can I open a PR for this ?

@williamdes
Copy link
Member

@apoorvkhare07 You can open a pull-request since this seems to be a bad idea to set the value in the code :)

@apoorvkhare07
Copy link
Contributor

Ya, on it.

apoorvkhare07 added a commit to apoorvkhare07/phpmyadmin that referenced this issue Mar 25, 2019
apoorvkhare07 added a commit to apoorvkhare07/phpmyadmin that referenced this issue Mar 25, 2019
Signed-off-by: apoorv <apoorvkhare007@gmail.com>
@williamdes williamdes added Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete labels Mar 25, 2019
@ghost
Copy link
Author

ghost commented Mar 28, 2019

Awesome!

@williamdes williamdes added this to ready to merge in issues Apr 29, 2019
@williamdes williamdes moved this from ready to merge to Closed in issues May 1, 2019
@williamdes williamdes added this to the 4.8.6 milestone May 1, 2019
@williamdes williamdes self-assigned this May 1, 2019
williamdes added a commit that referenced this issue May 1, 2019
Fixes: #15059
Pull-request: #15103

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue May 1, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants