MySQL ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

First you login with mysql -u root -p and check the current policy rules by:

# SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password_dictionary_file    |        |
| validate_password_length             | 5      |
| validate_password_mixed_case_count   | 1      |
| validate_password_number_count       | 1      |
| validate_password_policy             | MEDIUM |
| validate_password_special_char_count | 1      |
+--------------------------------------+--------+

Then you can change any of the above variables at your will:

# SET GLOBAL validate_password_length = 5;
# SET GLOBAL validate_password_number_count = 0;
# SET GLOBAL validate_password_mixed_case_count = 0;
# SET GLOBAL validate_password_special_char_count = 0;

Finally you can create a database and a user accessing it with a simpler password:

# CREATE USER 'laravel'@'localhost' IDENTIFIED BY 'laravel';
# GRANT ALL PRIVILEGES ON *.* TO 'laravel'@'localhost' WITH GRANT OPTION;
# CREATE DATABASE laravel;
# FLUSH PRIVILEGES;

After that you can login with mysql -u user1 -p laravel using password laravel

 

sumber

Advertisements

Cara Install Moodle di Ubuntu

Moodle adalah aplikasi open source untuk e-learning berbasis web. Moodle telah banyak diimplementasikan di berbagai sekolah dan perguruan tinggi di Indonesia.

Tutorial instalasi Moodle ini menggunakan:

Install LAMP server

sudo apt-get updatesudo apt-get update

sudo apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0 php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring

Buat database

Download Moodle

Extract Moodle dan pindahkan ke /var/www/html

tar xzvf moodle-latest-34.tgz
sudo mv moodle /var/www/html/
cd /var/www/html
sudo chown -R :www-data moodle
sudo chmod -R 775 moodle

Buat direktori moodledata

cd /var/wwwcd /var/www

sudo mkdir moodledata

sudo chown -R :www-data moodledata

sudo chmod 775 moodledata

Akses http://localhost/moodle atau http://IP_SERVER/moodle
Pilih bahasa, setelah instalasi masih bisa diganti
cara install moodle di ubuntu

Konfirmasi direktori instalasi dan data
cara install moodle di ubuntu

Pilih database driver mysqli
cara install moodle di ubuntu

Database settings
cara install moodle di ubuntu

Konfirmasi lisensi
cara install moodle di ubuntu

Pengecekan kebutuhan server, extension PHP. Jika ada yang kurang, install extension dan restart apache. Misalnya kurang extension mbstring, curl, dan openssl cara installnya

sudo apt-get install php-mbstring php-curl php-openssl

Restart apache

Kemudian reload kembali halaman ini
cara install moodle di ubuntu

Jika semua environment sudah terpenuhi ditampilkan pesan Your server environment meets all minimum requirements..
cara install moodle di ubuntu

Proses instalasi dimulai. Cek semua statusnya apakah Success atau tidak
cara install moodle di ubuntu

Isi informasi General.
Password minimal 8 karakter, terdapat 1 karakter angka, 1 karakter huruf kapital, dan 1 karakter spesial seperti * atau #.
cara install moodle di ubuntu

Isi Front page settings
cara install moodle di ubuntu

Jika berhasil, langsung masuk ke Dashboard
cara install moodle di ubuntu

selamat mencoba 🙂

 

sumber

How setup my server

1. Check OS version

Check OS version    – centos : rpm –query centos-release

2. Install apache/http

– masuk super user : su – (input username & password)

– jalankan : sudo yum install httpd

– start apache/http : sudo service httpd start

– ubah port jika diperlukan, jalankan : vi /etc/httpd/conf/httpd.conf

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
3. Install mysql

– masuk super user : su – (input username & password)

– jalankan : sudo yum install mysql-server

– start mysql : sudo service mysqld start

– set config mysql : sudo /usr/bin/mysql_secure_installation

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
4. Install php

– masuk super user : su – (input username & password)

– jalankan : sudo yum install php php-mysql

– restart apache/http : sudo service httpd restart

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
5. Install git

– masuk super user : su

– (input username & password)

– update repo : yum update

– install : yum install git

– cek versi git : git –version

– regis : git config –global user.name “mbwn”   git config –global user.email “git@mbwn.co.id”

– info : https://www.liquidweb.com/kb/how-to-install-git-on-centos-6
6. Install Phalcon

a. Check Versi Php : php -v

. Upgrade Php jika dibawah 5.6 harus upgrade Php

*. jika belum terinstall wget : yum install wget

*. jalankan : wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm

*. jalankan : wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

*. set config : vi /etc/yum.repos.d/remi.repo

*. [remi] = enable=1   [remi-php56] = enable=1 :wq

*. upgrade : yum -y upgrade php*

*. cek kembali versi php : php -v

*. info : https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/

b. Install

*. tambahkan repository : curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.rpm.sh | sudo bash

*. Php 5.6 : sudo yum install php56u-phalcon

*. Php 7   : sudo yum install php70u-phalcon

*. package : sudo yum install php-devel pcre-devel gcc make

*. package : yum –enablerepo=remi,epel install php php-mysql gcc libtool

*. tambahkan extension : echo “extension=phalcon.so” > /etc/php.d/phalcon.ini

*. chmod 777 /var/www/html/ : lakukan untuk permision folder

*. cek extension dan installasi, buat file info.php : <?php echo phpinfo(); ?> dan hit   c. Phalcon

*. dalam akses root pindah ke : cd /opt/

*. package : git clone https://github.com/phalcon/cphalcon.git     #SAMPE SINIH

*. cd cphalcon/build

*. sudo ./install

*. tambahkan extension : echo “extension=phalcon.so” > /etc/php.d/phalcon.ini

*. restart apache/http : service httpd reload dan service httpd restart

*. info : https://tecadmin.net/install-phalcon-php-framework-on-centos-redhat/#

d. masalah Mod-Rewrite is not enabled

*. ubah : AllowOverride None to AllowOverride All pada : /etc/httpd/conf/httpd.conf

*. pastikan .htaccess dan .htrouter.php pada main folder

*. masalah -> Volt directory can’t be written : chmod -R a+w cache (biasanya ada difolder cache)   e. Gagal open Dr 2

*. delete dalam folder filesystem (engine) dan ubah permision filesystem menjadi 777 : chmod 777 /var/www/html/smsengine/filesystem/

7. Installasi CMS

a. copy semua file cms

b. ubah config db

c. ubah config base url

. Installasi Engine

a. copy semua file engine

b. ubah config db

c. ubah permision chache : chmod -R a+w /var/www/html/smsengine/cache

info : https://forum.phalconphp.com/discussion/153/volt-directory-can-t-be-written

d. ubah permision filesystem : chmod 777 /var/www/html/smsengine/filesystem

e. pada check engine, crontab ditambahkan sh pada awal untuk eksekusi file .sh

———————-Configurasi crontab -e

*/10 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_10minutes.sh >> /var/www/html/smsengine/log/engine_10minutes.log#*/30 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_30minutes.sh >> /var/www/html/smsengine/log/engine_30minutes.log
#30 12 * * * sh /var/www/html/smsengine/enginecheck/check_engine_12oclock.sh >> /var/www/html/smsengine/log/engine_12oclock.log00 01 * * * sh /var/www/html/smsengine/enginecheck/check_engine_day.sh >> /var/www/html/smsengine/log/engine_day.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_1minute.sh >> /var/www/html/smsengine/log/engine_1minute.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_telco.sh >> /var/www/html/smsengine/log/engine_telco.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_app.sh >> /var/www/html/smsengine/log/engine_app.log#00 07 * * * sh /var/www/html/smsengine/enginecheck/check_engine_morning.sh >> /var/www/html/smsengine/log/engine_morning.log
00 */1 * * * sh /var/www/html/smsengine/enginecheck/check_engine_1hour.sh >> /var/www/html/smsengine/log/engine_1hour.log

SymptomsHow to set max_allowed_packet size to 16 MB for MySQL?
ResolutionFollow the steps below to achieve the same:
Connect to the server using SSH/RDP.Set the max_allowed_packet value in [mysqld] and [mysqldump] sections of my.cnf file:
[mysqld] max_allowed_packet=16M …. [mysqldump] max_allowed_packet=16M
Restart MySQL service:
# service mysqld restart mysql start/running, process 2496

How to Verify a CentOS Linux Server is 32 Bit or 64 Bit

To verify if a system is 32 bit versus 64 bit you can use the uname command. Below are examples of using the uname command from the CLI on a 32 bit system followed by using the uname command on a 64 bit system.

32 Bit CentOS Linux Server

BASH

[root@server ~]# uname -a

Linux server1.example.com 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:33:52 EDT 2008 i686 i686 i386 GNU/Linux

64 Bit CentOS Linux Server

BASH
[root@server ~]# uname -a
Linux server.example.com 2.6.18-53.1.21.el5 #1 SMP Tue May 20 09:35:07 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

As you can see above the 64 bit server will show x86_64 numerous times after the install date and time. The 32 bit system will show i686 and i386 after the install date and time. So it is very easy to verify if a system is 32 bit versus 64 bit using the “uname -a” command from a shell.

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

The following steps are to reset the password for a user in case you forgot, this would also solve your mentioned error.

First, stop your MySQL:

sudo /etc/init.d/mysql stop

or

sudo service mysqld stop

Now start up MySQL in safe mode and skip the privileges table:

sudo mysqld_safe --skip-grant-tables &

and then Login with root:

mysql -uroot

And assign the DB that needs to be used:

use mysql;

Now all you have to do is reset your root password of the MySQL user and restart the MySQL service:

update user set password=PASSWORD("YOURPASSWORDHERE") where User='root';

flush privileges;

quit and restart MySQL:

quit

sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start Now your root password should be working with the one you just set, check it with:

mysql -u root -p


and....

walaaaaa...

it works!!!

Model could not be loaded while executing query [Phalcon Framework]

i get some trouble when using model query for execute in phalcon framework like this sample and the result :

$query = new Query(
“SELECT * FROM Campaign”,
$this->getDI()
);

Model ‘Campaign’ could not be loaded
#0 [internal function]: Phalcon\Mvc\Model\Manager->load(‘Campaign’, true)
#1 [internal function]: Phalcon\Mvc\Model\Query->_prepareSelect()
#2 [internal function]: Phalcon\Mvc\Model\Query->parse()
#3 /var/www/html/gamanads/app/controllers/AdspaceController.php(185): Phalcon\Mvc\Model\Query->execute()
#4 [internal function]: Vokuro\Controllers\AdspaceController->offerwallAction()
#5 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(Vokuro\Controllers\AdspaceController), ‘offerwallAction’, Array)
#6 [internal function]: Phalcon\Dispatcher->_dispatch()
#7 [internal function]: Phalcon\Dispatcher->dispatch()
#8 /var/www/html/gamanads/public/index.php(41): Phalcon\Mvc\Application->handle()
#9 {main}

how i solve this problem is just, get full path for the model in models folder like this.

$query = new Query(
“SELECT * FROM Vokuro\Models\Campaign”,
$this->getDI()
);

and, taraaaaaa…. works very well.

thankyou.