How To Create a Sudo User on Ubuntu / Debian

0


usermod -aG sudo username

Error in phpMyAdmin : #2054 With [caching_sha2_password]

0

Error (1) : #2054 - The server requested authentication method unknown to the client
Error (2) : mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]

Fix In Linux :

First you should find my.cnf.
Edit my.cnf.
Add at the end :
[mysqld]
default_authentication_plugin=mysql_native_password
Exit Editor and restart MySQL :
sudo service mysql restart

تحديث ال MySQL من 5.5 إلى 5.7 وغيرها

0
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
 apt-get install gdebi
sudo gdebi mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_upgrade -u root -p
sudo service mysql restart

حفظ الــــ iptables في ملف بصيغة .txt

0

iptables-save > إسم الملف الذي تريده.txt
 مثال :
 iptables-save > iptables_rules.txt

السماح بالتحديث والتطوير عن طريق أمر apt-get **** عن طريق المصادر غير الموثوقة

0
الأمر : 
للتطوير : sudo apt-get --allow-unauthenticated upgrade
للتحديث :  sudo apt-get --allow-unauthenticated update

مشكلة [HY000] [2054] عند التحديث لــــ MySQL 8 - Linux

0

الحل :
التعديل على ملف my.cnf
nano /etc/mysql/my.cnf
إضافة السطر التالي :
[mysqld]
default_authentication_plugin= mysql_native_password
عمل إعادة تشغيل للــــ MySQL :
sudo service mysql stop
sudo service mysql start 

بإمكانك عمل حساب بصلاحيات الآدمن :

تسجيل الدخول للــــ MySQL :
mysql -u إسم الحساب -p
ثم أكتب كلمة السر 
 

CREATE USER 'إسم الحساب'@'localhost' IDENTIFIED WITH mysql_native_password BY 'كلمة السر';
GRANT ALL PRIVILEGES ON *.* TO 'إسم الحساب'@'localhost' WITH GRANT OPTION;
CREATE USER 'إسم الحساب'@'%' IDENTIFIED WITH mysql_native_password BY 'كلمة السر';
GRANT ALL PRIVILEGES ON *.* TO 'إسم الحساب'@'%' WITH GRANT OPTION;

وعمل قاعدة بيانات للحساب :

CREATE DATABASE IF NOT EXISTS `DB` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `DB`.* TO 'إسم الحساب'@'%' ;
FLUSH PRIVILEGES ;
 

حل مشكلة KEYEXPIRED بعد تحديث الــــ MySQL Linux

0
الخطاً :
W: GPG error: http://repo.mysql.com/apt/ubuntu xenial InRelease: The following signatures were invalid: KEYEXPIRED 1550412832  KEYEXPIRED 1550412832  KEYEXPIRED 1550412832
W: The repository 'http://repo.mysql.com/apt/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
الحل : 
sudo rm -rf /etc/apt/sources.list.d/*
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update 

نسح إحتياطي لجميع قواعد البيانات عن طريق أوامر نظام اللينكس Linux

0

كتابة الأمر التالي : 
mysqldump -u USER -p --all-databases > all_db.sql
حيث :
USER : إسم حساب الذي تريد الدخول إليه لعمل النسخ الإحتياطي.
 all_db.sql : إسم الملف الذي سوف يحفظ به.

Error : 0% [Connecting to it.archive.ubuntu.com (***********)]

0

عندما تحاول عمل الأمر التالي :
apt-get update
 تحصل على الخطأ التالي :
0% [Connecting to it.archive.ubuntu.com (***********)]
الحل :

يجب عليك تعديل ملف gai.conf الموجود بالمسار التالي : 

/etc/gai.conf
بإمكانك إستخدام أي طريقة لتعديل الملف, مثلاً لنستخدم vim, ليصبح الأمر كالتالي :


sudo vim /etc/gai.conf


بعد كتابة الأمر يجب عليك البحث عن السطر ( بإمكانك الكتابة في الملف عن طريق الضغط على زر I ) :
#precedence ::ffff:0:0/96 100

بالغالب يكون بالسطر رقم 54, وسوف تجد في أوله رمز # قم بحذف الرمز ليصبح السطر كالتالي :

precedence ::ffff:0:0/96 100 
ثم أخرج عن طريق الضغط على كبسة Insert الموجودة في لوحة المفاتيح ثم أكتب :
:wq
 ثم Enter.

Save your files from Linux To Google Drive

0
Commands :

wget https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download

mv uc\?id\=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA gdrive 

chmod +x gdrive

sudo install gdrive /usr/local/bin/gdrive

gdrive list

AND YOU WILL SEE MESSAGE WITH URL Like


Authentication needed
Go to the following url in your browser:
URL Enter verification code:

Copy it and open it from your browser and login, after login you will Get some code For example : 
4/KQEERkjXXs5JTXTLPFpAVwlsq7ignMSAdpA8j-HMVmKMhjcOXUfxzxQ

Then copy it and enter it below Enter verification code:

and you can upload and make another operations :

Help Details :

gdrive [global] list [options]                                 List files
gdrive [global] download [options]                     Download file or directory
gdrive [global] download query [options]                Download all files and directories matching query
gdrive [global] upload [options]                         Upload file or directory
gdrive [global] upload - [options]                       Upload file from stdin
gdrive [global] update [options]                Update file, this creates a new revision of the file
gdrive [global] info [options]                         Show file info
gdrive [global] mkdir [options]                          Create directory
gdrive [global] share [options]                        Share file or directory
gdrive [global] share list                             List files permissions
gdrive [global] share revoke            Revoke permission
gdrive [global] delete [options]                       Delete file or directory
gdrive [global] sync list [options]                            List all syncable directories on drive
gdrive [global] sync content [options]                 List content of syncable directory
gdrive [global] sync download [options]         Sync drive directory to local directory
gdrive [global] sync upload [options]           Sync local directory to drive
gdrive [global] changes [options]                              List file changes
gdrive [global] revision list [options]                List file revisions
gdrive [global] revision download [options]    Download revision
gdrive [global] revision delete                Delete file revision
gdrive [global] import [options]                         Upload and convert file to a google document, see 'about import' for available conversions
gdrive [global] export [options]                       Export a google document
gdrive [global] about [options]                                Google drive metadata, quota usage
gdrive [global] about import                                   Show supported import formats
gdrive [global] about export                                   Show supported export formats
gdrive version                                                 Print application version
gdrive help                                                    Print help
gdrive help                                           Print command help
gdrive help                              Print subcommand help


if you want to upload for example use :

gdrive upload file.zip

PHP-Fusion Core 9 || Chmod Files to 777

0


chmod 777 infusions/articles/images/ infusions/blog/images/ infusions/blog/images/thumbs/ infusions/downloads/files/ infusions/downloads/images/ infusions/downloads/submissions/ infusions/downloads/submissions/images/ infusions/forum/attachments/ infusions/forum/images/ infusions/gallery/photos/ infusions/gallery/photos/thumbs/ infusions/gallery/submissions/ infusions/gallery/submissions/thumbs/ infusions/news/images/ infusions/news/images/thumbs/

PHP-Fusion Core 8 || Chmod Files to 777

0


chmod 777 administration/db_backups forum/attachments downloads downloads/images downloads/submissions/ downloads/submissions/images ftp_upload images images/imagelist.js images/articles images/avatars images/news images/news/thumbs images/news_cats images/blog images/blog/thumbs images/blog_cats images/photoalbum images/photoalbum/submissions config.php robots.txt

The $cfg['TempDir'] (./tmp/) is not accessible - phpMyAdmin

0


Error : The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

How To Fix ?

1) Make DIR in phpMyAdmin, Name : tmp          #Default : /usr/share/phpmyadmin

Linux Command :

mkdir /usr/share/phpmyadmin/tmp
2)  Give it full permission 777 .

Linux Command :

chmod 777 tmp
3) Save and exit. 

blowfish_secret - phpMyAdmin

0


Error : The configuration file now needs a secret passphrase (blowfish_secret).

How To Fix ?

1) Go to phpMyAdmin DIR.        #Default : /usr/share/phpmyadmin

Linux Command :
cd /ust/share/phpmyadmin

2) If  config.inc.php doesn't  created then you will see config.sample.inc.php, so rename it or move it from - config.sample.inc.php to config.inc.php.

Linux Command :
cp config.sample.inc.php config.inc.php

3) Edit config.inc.php.

Linux Command :
nano config.inc.php
4) You will find

$cfg['blowfish_secret'] = '';
Edit it to
$cfg['blowfish_secret'] = '/YyQi0j066l[NijqYuUyeoa,2qSs5-ac';
For Example

** Should be 32 chars long

5) Save it and exit.

user_registration_datetime - MYSQL

0


Error : `user_registration_datetime` datetime NOT NULL DEFAULT

How To Fix ?

1) Open Your phpMyAdmin.
2) Enter your database.
3) Click SQL from the TOP.
4) Write in the textbox :

SET sql_mode = '';

Or

SET GLOBAL sql_mode = '';