How to resolve “ORDER BY clause is not in SELECT list” caused MySQL 5.7 with SELECT DISTINCT and ORDER BY

If you have control of the server and you are running legacy code you can’t easily change, you can adjust the SQL mode of the server and remove “only_full_group_by” either for the duration of boot, by running the query SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,’ONLY_FULL_GROUP_BY’,”));’ or by adding sql_mode=” to your my.cnf file. Obviously its better to change your code if […]

Continue Reading

Mysql Consume High Server resource Then Optimization of MySQL settings

Why does MySQL consume high memory? Application software like Python, PHP, JAVA threads utilize more memory when configured improperly or un-optimized queries, complex coding, etc. Due to improper configuration of MySQL, it leads to inefficient memory or wastage of memory. If the memory is lower than, required by the processes on the server. Resolutions to […]

Continue Reading

Check and Repair a Corrupted MySQL Database Table Using SSH?

Please refer the following steps: a)     Login to your MySQL server using Secure Shell (SSH). b)     Enter the following command at root prompt: mysqlcheck -r [database name] Where, mysqlcheck is the command to check the database, -r is the command to repair the corrupted tables. Replace the [database name] with your actual database name. Please note that MyISAM is a default storage engine […]

Continue Reading

mysql disabled strict standards on your server

Get following error on php site and upload images, video, files, not working also folder creation & copy files from other server via url copy not working. error display as bellow ================================================================================ Fatal error: [SQL] [1364] Field ‘icon’ doesn’t have a default value INSERT INTO files (`name`,`path`,`pid`,`time`,`size`) VALUES ================================================================================ here is solution: looks to be […]

Continue Reading

empty the eximstats database via the MySQL command line while the MySQL service is down

You’re not able to empty the eximstats database via the MySQL command line while the MySQL service is down. I moved away the eximstats database by running the following command: mv -v /var/lib/mysql/eximstats /home/cptechs/ Your server’s / partition has free space now: ===== [email protected] ~]cPs# df -h / Filesystem Size Used Avail Use% Mounted on […]

Continue Reading

SQL SERVER – Restore Database Backup using SQL Script (T-SQL)

Database YourDB has full backup YourBaackUpFile.bak. It can be restored using following two steps. Step 1: Retrive the Logical file name of the database from backup. RESTORE FILELISTONLY FROM DISK = ‘D:BackUpYourBaackUpFile.bak’ GO Step 2: Use the values in the LogicalName Column in following Step. —-Make Database to single user Mode ALTER DATABASE YourDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE —-Restore Database RESTORE DATABASE YourDB FROM […]

Continue Reading