I am trying to install a Wordpress site on a local server (Ubuntu 16.04 in a docker container).
Xampp is installed and running, and I have created a database and a username with proper rights:
mysql -uroot -e "CREATE USER 'localuser'#'localhost' IDENTIFIED BY 'localpassword';";
mysql -uroot -e 'CREATE DATABASE 'localdatabase';';
mysql -uroot -e "GRANT ALL ON localdatabase.* TO 'localuser'#'localhost';";
I've also updated my wp-config.php file with the credentials above.
Still, when I try to install wordpress from there (I use wp-cli), I get the message "Error: Error establishing a database connection. This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down."
I've double checked the credentials, and xampp is indeed running, so what should I check next? Could this come from a config file that is missing something?
What hostname are you using in the wp-config? Also did the commands finish succesfully? For creating the db you used apostrophes instead of quotes. You can try the mysql client directly with mysql -u -p -h .
In wp-config.php, use 127.0.0.1 instead of localhost for the database hostname.
Related
I am trying to start a Alfresco server but it got hung in between,Please see below screenshot, I have copied Alfresco instance from one server to another server, I have also made necessary changes in Alfresco-global.properties.
Please help on this
For backup of your database and alf_data you can download and run the following script.
http://www.contcentric.com/alfresco-backup/
Note: you will have to manually backup the indexes from the solr4 folder and other customizations (like amps and jar deployed)
Follow the alfresco restore steps
1. Install new alfresco instance. Do not start server
2. Start postgresql using the following command
./alfresco.sh start postgresql
3. Go to the <ALF-HOME>/postgresql/bin
4. Run the following commmand
psql -U alfresco -h <hostname> -p port
e.g. psql -U alfresco -h localhost -p 5422
5. It will ask you to set the password, enter the password and remember it
6. Run the following command
psql -U alfresco -h <host> -p port <dbname> < dumpFile
e.g. psql -U alfresco -h localhost -p 5422 alfresco < /opt/migration-backup/01-10-2018-15-54-47/database/alfresco_db_dump
7. You will notice the multiple tables and index are created
8. Start the tomcat using the following command
./alfresco.sh start tomcat
9. Test your migration.
I managed to follow all the steps to create EC2 instance and install R Server on it.
When I go to RStudio Server page to connect (which looks something like "ec2-[Public IP]-.eu-west-3.compute.amazonaws.com:8787"), I am asked a username and a password.
I figured out to set a username ("user1") this way:
$ sudo useradd user1
But then when I try this command to write the password:
echo user1:password | chpasswd
I receive this message:
chpasswd: cannot lock /etc/passwd; try again later.
I looked at different solutions suggested here:
https://superuser.com/questions/296373/cannot-lock-etc-passwd-try-again-later
but I do not see a resolution to my problem.
I did not find either any passwd.lock, shadow.lock, group.lock, gshadow.lock files to remove.
type in 'sudo passwd your_username' and you will be prompted to enter a new password
I have not been able to find an answer to this question, although there have been some similar questions. So I have a Amazon EC2 that I launched using a "Magento quick start" on the Amazon marketplace. Anyway so the site is working I can get to it via my domain and can also ssh in.
However when I login via filezilla I am using my key and also the username ubuntu . Now when I try to ftp something into my var/www/magento folder I get a permission denied. The default owner/group is nginx nginx
If I do a
sudo chown -R ubuntu:nginx var/www/magento
I am then able to ftp files up to the server. However when I go in the browser to the url the site then gives me an "this site can not be reached" error in chrome browser. However if I
sudo chown -R nginx:nginx var/www/magento
I am then able to see the site in the browser but am back to not being able to upload anything.
I also tried doing
sudo adduser ubuntu nginx
I got a success message but still not able to ftp. I get a permission denied error
So what is the ssh command(s) that would enable me to login to sftp with user ubuntu and be able to upload files and even change file permissions without making the site no longer load when you type in its domain name?
I believe I maybe just need to add the "ubuntu" user to the nginx group??
If so what would that command be?
thanks
try sudo usermod -a -G nginx ubuntu this will add your existing ubuntu user to nginx group. Also, log out from any existing session and login back.
I am trying to install phpmyadmin + mariadb.
My PHP configure string has the following mysql flags
CONFIGURE_STRING="--prefix=/etc/php7 --enable-mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd <and other flags>"
I installed mariadb with the following:
sudo apt-get install mariadb-client mariadb-server
sudo mysql_secure_installation
I can login with a password via
sudo mysql -u root -p
Then I installed phpmyadmin with
cd /var/www/html
git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git
mv phpmyadmin datastore #change name to datastore
When I open http://localhost/datastore I received the phpmyadmin login page; in attempt to login with root username and root password, i received the following error:
#2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
AND
mysqli_real_connect(): (HY000/2002): No such file or directory.
I am using php7 on ubuntu 14.04.
I wish to be able to connect mariadb and phpmyadmin.
Got some directions from Git on how to solve the problem and these are my steps, I feel someone may encounter the same challenge.
In phpmyadmin copy config.sample.inc.php into config.inc.php
sudo cp config.sample.inc.php config.inc.php
Check MariaDB status with STATUS;
MariaDB [(none)]>STATUS; [ENTER]
Check Connection - if localhost via Unix Socket then copy unix socket value.
Go to config.inc.php and force the following
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
Then change permission of config.inc.php in phpmyadmin
sudo chmod 0755 config.inc.php
Point your browser to phpmyadmin and login with your username and password.
Git link
I just finished my website here I used ASP.net & MySQL.
I uploaded my website file all right.
But the problem is with my database. I create my database very will and I create all my tables but the problem is that I can't execute my stored procedure?
That is because i don't have the privileges to do this operation?
The error in phpMyAdmin is:
MySQL said:
#1227 - Access denied; you need the SUPER privilege for this operation
How can I fix this?
As MySQL root:
$ mysql -u root -p # ..or, if no password has been set..
$ mysql -u root
Run this command:
GRANT SUPER ON *.* TO user#localhost;
Further reading:
http://dev.mysql.com/doc/refman/5.1/en/grant.html