UTF8 DB Text Fix
Viewed 2860 times since Sat, Sep 5, 2020
Server error: Connection reset by peer | End of script output before headers
Viewed 2447 times since Mon, Feb 28, 2022
I managed to solved this by adding FcgidBusyTimeout . Just in case if anyone have similar issue with me. Here is my settings on my apache.conf: <VirtualHost *:80> ....... <IfModule mod_fcgid.c> FcgidBusyTimeout 3600 <...
Read More
"End of script output before headers" in Apache + PHP
Viewed 613 times since Sun, Feb 27, 2022
The issue was that the request was timing out before the script completed, due to a long-running database query. So that generic End of script output before headers error can be caused by server timeouts as well as file permissions...
Read More
How do I import an SQL file using the command line in MySQL?
Viewed 597 times since Wed, Sep 2, 2020
mysql -u username -p database_name < file.sql Source: https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql
Read More
LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
Viewed 574 times since Wed, Sep 2, 2020
SELECT * FROM `tbl_product2` A LEFT JOIN `tbl_product` B ON A.id_product = B.id_product WHERE B.id_product IS NULL SELECT * FROM `tbl_product2_lang` A LEFT JOIN `tbl_product_lang` B ON A.id_product = B.id_product WHERE B.id_product IS...
Read More
How to export a mysql database using Command Prompt?
Viewed 567 times since Wed, Sep 2, 2020
mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql Source: https://stackoverflow.com/questions/3031412/how-to-export-a-mysql-database-using-command-prompt
Read More
mysqldump exports only one table
Viewed 543 times since Wed, Sep 2, 2020
mysqldump -u YourUser -p mydb t1 t2 t3 > mydb_tables.sql Source: https://stackoverflow.com/questions/18741287/mysqldump-exports-only-one-table
Read More
Host ’xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
Viewed 524 times since Thu, Feb 4, 2021
bind-address = 127.0.0.1 Ref: https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server
Read More
How to change the MySQL root account password on CentOS7?
Viewed 491 times since Thu, Feb 4, 2021
1. Stop mysql: systemctl stop mysqld 2. Set the mySQL environment option systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" 3. Start mysql usig the options you just set systemctl start mysqld 4. Login as root mysql -u root 5. Update the...
Read More
Optimizing query for large number of rows in mysql
Viewed 490 times since Wed, Sep 9, 2020
ALTER TABLE tbl_content ADD INDEX idx_state (state);ALTER TABLE tbl_content ADD INDEX idx_catid (catid);ALTER TABLE tbl_content ADD INDEX idx_section (sectionid);ALTER TABLE tbl_content ADD INDEX idx_publish (publish_up);ALTER TABLE tbl_content ADD...
Read More
Incorrect string value: ’\xF0\x9F\x8E\xB6\xF0\x9F...’ MySQL
Viewed 477 times since Thu, Feb 3, 2022
SET NAMES utf8mb4; ALTER DATABASE dreams_twitter CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; Use the following command to check that the changes are made SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR...
Read More
Export and Import all MySQL databases at one time
Viewed 465 times since Fri, Mar 18, 2022
Export: mysqldump -u root -p --all-databases > alldb.sql Look up the documentation for mysqldump. You may want to use some of the options mentioned in comments: mysqldump -u root -p --opt --all-databases > alldb.sql mysqldump -u root -p -...
Read More