Posts

Timezone missing in mysql database (celery periodic task)

 Ref:  https://stackoverflow.com/questions/21351251/database-returned-an-invalid-value-in-queryset-dates#21571350 You have to load timezone tables into mysql ( http://dev.mysql.com/doc/refman/5.6/en/mysql-tzinfo-to-sql.html ). Try execute on your database server: mysql_tzinfo_to_sql / usr / share / zoneinfo | mysql - D mysql - u root - p And then run "flush tables" or "flush query cache", otherwise the problem may not disappear even though you've loaded the correct timezone data: mysql - u root - p - e "flush tables;" mysql

How to Import and Export MySQL Database Command line in Linux

************ TO EXPORT ************ 1. SSH login as root. 2. Run command   mysqldump -a -u ejobsolution_db_user --password= db_password ejobsolution_db > ejobsolution_db.sql Download ejobsolution_db.sql from root directory Reference:  https://webhostinggeeks.com/howto/import-and-export-mysql-database-command-line-in-linux/ Reference:  https://archive.virtualmin.com/node/6032 How to Export MySQL Database Command line in Linux 1. Syntax to Export: mysqldump -u USERNAME -p DATABASE_NAME > filename.sql How to Export MySQL Database Command line in Linux 2. Syntax to Import: mysql -u USERNAME -p DATABASE_NAME < filename.sql CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'db_user'@'localhost'; mysql -u db_user -p CREATE DATABASE db_name;

Laravel Stuffs

Create project with composer: composer create-project laravel/laravel example-app To run with IP address for Mobile app development: php artisan serve --host 0.0.0.0 --port 8000  To migrate: php artisan migrate Sqlite: touch database/database.sqlite User absolute path for sqlite: DB_CONNECTION=sqlite  DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=/media/than/8d3a469e-9421-470b-842e-26012f02dd47/than/dev_laravel/example-app/database/database.sqlite DB_USERNAME=root DB_PASSWORD= Reference:   https://laravel.com/docs/9.x/installation

JAVA_HOME setup and Integrate with Android Studio Project in Ubuntu

 $ whereis jvm      jvm: /usr/lib/jvm $ nano .bashrc Write :      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64      export JAVA_HOME      PATH=$PATH:$JAVA_HOME/bin      export PATH Close Terminal and Re-open Terminal: $ echo $JAVA_HOME      /usr/lib/jvm/java-11-openjdk-amd64 Reference :  https://youtu.be/106uH7USwZ8 In Android Studio: Fire->Project Structure -> Need to update in SDK Location and Modules sections to java-11 Reference:  https://youtu.be/lv-jE2d4Aoc

Generate SHA-1 and SHA-256 for Debug and Release android app

Go to the Root directory of the project and generate on Terminal. Debug SHA-1 and SHA-256:      keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android Release SHA-1 and SHA-256: keytool -list -v -keystore /home/than/flutterProjects/PlayStoreKeystore/farm_to_retail.jks - alias key0

Ubuntu running slow? Check your CPU settings!

 https://thelinuxuser.com/ubuntu-running-slow/

Django Migration Problem Solution

* Delete table manually from DB * Delete migration file in migrations folder * User following example commands:         - python manage.py makemigrations         -  python manage.py migrate --fake core 0038_auto_20211003_2229         -  python manage.py migrate core 0039_customerbkashpayment (Note: 0039_customerbkashpayment is the recently migration file. 'core' is app name. 0038_auto_20211003_2229 is the previous on issue migrated file.)