What effects does using a binary collation have?

While answering this question, I became uncertain about something that I didn’t manage to find a sufficient answer to. What are the practical differences between using the binary utf8_bin and the case insensitive utf8_general_ci collations? I can see three: Both have a different sorting order; _bin‘s sorting order is likely to put any umlauts to … Read more

Select columns across different databases

Is it possible to do a select ( or insert) statement across different databases that are located on the same server? If yes, how? Answer You would specify the database by using the syntax databasename.tablename Example: SELECT mydatabase1.tblUsers.UserID, mydatabse2.tblUsers.UserID FROM mydatabase1.tblUsers INNER JOIN mydatabase2.tblUsers ON mydatabase1.tblUsers.UserID = mydatabase2.tblUsers.UserID AttributionSource : Link , Question Author : … Read more

MySQL Enum performance advantage?

Is there a performance advantage to using enum in situations where there are only 5-10 different possible values for a field? if not what is the advantage? Answer There is a huge performance penalty to using ENUM for operations such as: Query the list of permitted values in the ENUM, for instance to populate a … Read more

Not all parameters were used in the SQL statement (Python, MySQL)

I get an error on the following Python code: import mysql.connector cnx = mysql.connector.connect(user=’root’, password=”, host=’127.0.0.1′, database=’DB’) cursor = cnx.cursor() Name = “James” Department = “Finance” StartYear = 2001 CurrentPos = 2001 Link = “” add_user = (“INSERT INTO DB.tbluser ” “(username, department, startyear, currentpos, link) ” “VALUES (%s, %s, %d, %d, %s)”) data_user = … Read more

Job for mysqld.service failed See “systemctl status mysqld.service”

Console says [root@ip-172-31-18-2 mysql]# service mysqld start Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with an error code. See “systemctl status mysqld.service” and “journalctl -xe” for details. mysqld.service [root@ip-172-31-18-2 mysql]# systemctl status mysqld.service ● mysqld.service – SYSV: MySQL database server. Loaded: loaded (/etc/rc.d/init.d/mysqld) Active: failed (Result: exit-code) since Sat … Read more