Categories
blog mysql

MySQL Access denied for user ‘root’@’localhost’

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt install mysql-server
Categories
blog mysql

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

sudo dpkg-reconfigure mysql-server-5.5

change the root password.

Categories
blog ecommerce magento magento 2 mysql

magento 2 installation on digitalocean #bookmark

last part.

go to bin

php magento sampledata:deploy
php magento setup:di:compile
php magento setup:upgrade 
 

Categories
blog ecommerce magento magento 2 mysql

magento 2 installation digitalocean lamp bookmark

magento 2 installation digitalocean lamp #bookmark

apt-get update
apt-get install git wget
wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar
chmod +x /usr/local/bin/composer
cd /var/www/html

download and upload magento file https://www.magentocommerce.com/download

upload and unzip 
tar xjf file.tar.bz2
cd /var/www/html/theory
composer install
chown -R root:www-data /var/www/html/theory
find /var/www/html/theory -type f -print0 | xargs -r0 chmod 640
find /var/www/html/theory -type d -print0 | xargs -r0 chmod 750
chmod -R g+w /var/www/html/theory/{pub,var}
chmod -R g+w /var/www/html/theory/{app/etc,vendor}

DATABASE

https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial

mysql -u root -p
SHOW DATABASES;
CREATE DATABASE database name;
 DROP DATABASE database name;
 
GRANT ALL PRIVILEGES ON databasename.* TO 'databaseuser'@'localhost' IDENTIFIED BY 'passwordfordatabase';

 

Categories
blog digitalocean mysql

digitalocean upgrade mysql server 5.6

sudo apt-get purge mysql-server*

and after that, I did this:

sudo apt-get install mysql-server-5.6 

 

 

 

 

Start:

sudo /etc/init.d/mysql start

Stop:

sudo /etc/init.d/mysql stop

Restart / reload configs:

sudo /etc/init.d/mysql restart

Check run status:

sudo /etc/init.d/mysql status