For some reason I can't launch pHp myadmin from XAMPP, I've tried different versions uninstalling and re installing wont launch. Give me the following error..
Error
SQL query: Edit Edit
SET CHARACTER SET 'utf8mb4';
MySQL said: Documentation
#1115 - Unknown character set: 'utf8mb4'
Any idea? Cheers
Your version of MySQL is too old for your version of phpMyAdmin. See the release history for phpMyAdmin version 4.2.3.
Either upgrade MySQL or downgrade phpMyAdmin.
Replacing utf8mb4 with utf8 should work.
utf8mb4 is a superset of utf8.
Related
I'm running ubuntu 14.04 and flyway doesn't seem to be able to read my UTF-8 encoded SQL script.
I can run the sql script by using the terminal command
mysql -u root -p my_db < v1_1__Test_migration_script.sql
But when flyway runs it, I get the error Incorrect string value: on the file that is UTF-8 encoded.
My system has LANG set as en_US.UTF-8
Note that when flyway runs during setup on my Mac OSX machine it all works fine.
The issue was that the database was using a different character set and collation.
A fix that worked for me was to specify it explicitly
CREATE DATABASE my_db DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
I know that many had this problem, and solved it, but even with their solutions, I've gotten no luck..
I tried exporting my localhost phpadmin to my webserver, and i got:
SQL query:
/*!40101 SET NAMES utf8mb4 */;
MySQL said: Documentation
#1115 - Unknown character set: 'utf8mb4'
Local phpmyadmin:
Server type: MariaDB
Server charset: UTF-8 Unicode (utf8)
Version: 4.5.2
Webhost phpmyadmin:
Version: 2.11.4
Solved it. Downloaded MYSQL workbench, logged into my local database, and exported it from the program. Then, i simply imported the file, and it worked!
I have PHP 5.5.9 and MySQL 5.5.43 Innodb. This is in Kubuntu LTS /etc/mysql/my.cnf
printf("Current character set: %s\n", mysqli_character_set_name($conn));
Current character set: latin1
I've tried
default-character-set = utf8
first but then my mysql server didn't restart
Then I've tried
character-set-server = utf8
then my mysql shell didn't start
How can I rescue this issue? I've managed with
init_connect = 'SET NAMES utf8'
solve the problem for nonroot users, but the charset remains the same (it only displays as nonprivileged users UTF8, it is still Latin1).
And if (a big if) smnd could tell me WHERE should I use utf8mb4? Also in my.cnf file? I had my tables in utf8 and have migrated those with which I am working to utf8mb4 ...
Another Q: IS that applicable for Linux (Kubuntu) server:
https://www.youtube.com/watch?v=3M1Wpw4uOoM
Please help me, thanks, Gregor from lilaum.com
mysqli_set_charset('utf8').
init_connect is ignored for root connections.
utf8mb4 is effectively a superset of utf8. It is needed for Chinese and the new emoji, plus a scattering of obscure character sets.
PHP manual says:
MySQLnd always assumes the server default charset. This charset is sent during connection hand-shake/authentication, which mysqlnd will use.
MySQLnd is the MySQL native driver included with PHP 5.4 and above.
Unfortunately, I have to confirm that even in my system (PHP 5.6.17 with MySQL 5.5.47 on Debian Jessie 8.3) despite having configured /etc/mysql/my.cnf with the following entries
[mysqld]
character-set-server=utf8
[mysql]
default-character-set=utf8
the mysqlnd does not seem to assume the server default charset (utf8) but sets the connection charset to latin1 with collate latin1_swedish (maybe a default value considering MySQL AB was a swedish company).
So, it seems that there's no permanent way to set utf8 charset when connecting from a PHP application. You have to call
$mysqli->set_charset("utf8")
after each connection. This could be embedded in a custom 'dbconnect' PHP function in order to provide a sort of abstraction layer.
I am trying to connect to remote database server with phpadmin on my home system. My Server uses Mysql version 5.1.61 and this mysql version is very old for the new xampp phpadmin version. I am thinking to downgrade the phpadmin version in xammpp 5.6.8
But I am getting an error due to compatibility error.
Error:
SQL query: Edit Edit
SET CHARACTER SET 'utf8mb4';
MySQL said: Documentation
1115 - Unknown character set: 'utf8mb4'
"utf8mb4" is an extended character set used in Mysql 5.5.3 and higher. Try converting the DB to use utf8 only instead of utf8mb4.
Below URL might help.
http://ben.lobaugh.net/blog/201740/script-to-convert-mysql-collation-from-utf8mb4-to-utf8
At shell command prompt:
mysqladmin -u"username" -p"password" --default-character-set=utf8 CREATE my_db_schema
--default-character-set=utf8 seems to have no effect and I don't understand why.
Database gets created, but character set is latin1 with collation latin1_swedish_ci.
I found this question, which would seem to be the same issue, but even when I tried a non-root user as the selected answer suggested, I get identical behavior:
MySQL connection character set problems
(I'm using Windows and MariaDB if that makes any difference)
I have tried these mysqladmin.exe clients:
MariaDB 5.3.2 for Win32 (ia32) with default character set latin1 (no .ini)
MySQL 5.0.77 for linux-gnu (i686) with default character set utf8
In both cases, --default-character-set=utf8 or --default-character-set=latin1 do NOT override the MySQL server's .ini/.cnf settings.
As a workaround I'd suggest running:
echo "CREATE DATABASE my_db_schema DEFAULT CHARACTER SET utf8" | mysql -uusername -ppassword
--default-character-set=utf8 seems to have no effect and I don't understand why.
Database gets created, but character set is latin1 with collation latin1_swedish_ci.
This options does not influence the character of a datatabase, table or column when they are created.
The default-character-set is the character set of the connection to the server -- it ensures values you select from the database come through to the client with the correct encoding for display.
On the surface I'd say this appears to be a mysqladmin bug. I would let the MariaDB devs know about it.
http://kb.askmonty.org/en/reporting-bugs has general instructions about reporting bugs (ignore the bit about using the mysqlbug script, since it is not available on Windows).
P.S. And if the bug exists in MariaDB it likely also exists in MySQL.