Wordpress Bitnami MySQL(PhpMyAdmin) reset password on windows - wordpress

I got to work on project using Wordpress Bitnami stack. Original developer does not remember password for root user for MySQL database. I tried to follow the steps on Bitnami website.
https://docs.bitnami.com/installer/apps/wordpress/administration/change-reset-password/
It seems like everything went throught but I am still not able to access the database using root user.
This is whats inside my mysql-init.txt
ALTER USER 'root'#'localhost' IDENTIFIED BY 'mypass';
Server's response is that this file have been executed but nothing.
I tried to change mysql-init.txt to following
ALTER USER 'root'#'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'admin'#'localhost' IDENTIFIED BY 'mypass';
FLUSH PRIVILEGES;
After this went throught I am able to access the database using Admin user but my root password does not work. That means file have been executed correctly it just does not update my root password for some reason.
Stack is on Win 10
DB:Distrib 5.7.24, for Win32 on AMD64
Command to run DB with init file:
C:\Bitnami\wordpress-4.9.8-2\mysql\bin\mysqld.exe --defaults-file="C:\Bitnami\wordpress-4.9.8-2\mysql\my.ini" --init-file="C:\Bitnami\wordpress-4.9.8-2\mysql\mysql-init.txt" --console

The problem was in the mysql-init.txt file. Somehow I got a new line at the end of the password.
Very strange issue but hey Its solved.
ALTER USER 'root'#'localhost' IDENTIFIED BY 'mypass[Here was a new line]';
FLUSH PRIVILEGES;

Related

error reported during OpenStack installation on AWS with PackStack

I am getting the following error when passing the below command and its not accepting and getting error for localhost. I updated /etc/hosts file as well, not sure where it's picking up.
[root#cloud /]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user.
If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
Enter current password for root (enter for none):
Aborting!
Cleaning up...
[root#cloud /]#
While doing this just enter root instead of password
[root#cloud ~]# mysql_secure_installation
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
Dropping test database...
... Success!
Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Can't get to the root on juniper ssg5

Can't get to the root on juniper ssg5
After i enter my login username and password I'm stuck on this prompt
'my-fw->'
my-fw-> copy
^------unknown keyword copy
my-fw-> show
^------unknown keyword show
my-fw-> configure
^-----------unknown keyword configure
why can't i get to root#my-fw-> or root#my-fw-# prompt. What can i do to get to root. I'm using putty to console to the juniper ssg5.
[Note- I'm trying to backup config to a tftp server where i require to get to the root access]
You don't need root access. root is an special account and all / most of the commands works without root account. Any account which has privileges to perform configuration changes, can apply the command to archive the configuration on given site.
See junos-os-login-classes-overview for user privileges.
The prompt we get is in this format: user#hostname> Ref
If there is no hostname defined, then it is just: user>
Once you make sure that you have logged in with correct user, i.e. it has requirement permissions, you should be able to execute those commands and apply archival configuration.
I have a working solution, let me know if above doesn't help.

Can't use Nexus Repository Manager 3.0 default admin user

Just installed Nexus 3.0.0-03, started up, followed the doc, but can't login with default admin/admin123.
The only error I can see is the login refusal message:Incorrect username or password, or no permission to use the application.
user name is admin
There is password in /nexus-data/admin.password path in your nexus host.
cat /nexus-data/admin.password
you must change your password at first login
also If you implement nexus through docker, you should use command below:
docker exec -it <container_name_or_ID> cat /nexus-data/admin.password
You cannot create another admin user via configuration (without going deep down the rabbit hole), the initial user admin/admin123 should work.
Faced the same problem.
Steps I took to resolve it:
Open the admin.password file inside sonatype-work>nexus3 and copy it's contents.
Paste the copied value from step 1(from the admin.password file) into the password field. Enter 'admin' for the username.
Look into location:
/home/[yourHomeDirName]/sonatype-work/nexus3/admin.password

Connect drupal site to moodle site

I am using drupal 7.27 version in which I need to connect to moodle site and its database. So I used drupal module moodle_connection to connect it withmoodle site. As it does not offer any end feature functionality. I installed another module called moodle_views but unfortunately there is no data received from the moodle. When I debug I found that connection does not establish between both the sites.
I am calling moodle_connector_connect() function in custom module to connect to Moodle. But no success. And in the moodle connector settings I put the following information:
Database Type : mysql
Database Server : localhost
Database TCP Port : 3306
Database Name : drupal_moodle ('Name of the moodle database')
Database Prefix : mdl_
Database User : root
Database Password : (I don't have password for my database user so I kept blank)
Moodle URL : drupal_moodle (Moodle site url)
Please help me to get out of this.
Regards
Neha
Reading over the bug reports in the Drupal module moodle_connector, I noticed some issues related to setting values for the moodle database connection variables, and some issues with handling error conditions.
Combine this with your mention of blank password, suggests the following line might be a problem.
Reading moodle_connector.module, around line 51 I notice some lazy checking for unset parameters.
// Return false if settings are incomplete.
if (!$type || !$server || !$port || !$username || !$password || !$database) {
return FALSE;
}
It looks like the check for !$password will cause the function moodle_connector_connect() to exit and not connect to the moodle database if any of the values are unset or empty.
As a workaround, and a step in right direction security-wise, could you create a new MySQL user, specifically grant it the necessary privileges to allow Drupal to read the Moodle DB and set a password.
I would also strongly advise that you read over the MySQL 'post installation' section of the manual which advises setting a password on the root user accounts. Having no root password is convenient during initial installation, but is a security problem. Any ordinary user on the machine, or a nearby machine which can connect to port 3306, could gain full access to the database.
http://dev.mysql.com/doc/refman/5.1/en/postinstallation.html

How to Resolve "Error Establishing a Database Connection" on WordPress XAMPP Localhost for Google App Engine

Following Google App Engine's instructions for creating a local WordPress development platform, I created the database and initial user using the instruction's MySQL direction:
CREATE DATABASE IF NOT EXISTS wordpress_db;
CREATE USER 'wp_user'#'localhost' IDENTIFIED BY 'wp_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'#'localhost';
After running it without errors reported, MySQL subsequently reported back:
CREATE DATABASE IF NOT EXISTS wordpress_db;# 1 row affected.
CREATE USER 'wp_user'#'localhost' IDENTIFIED BY 'wp_password';# MySQL returned an empty result set (i.e. zero rows).
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'#'localhost';# MySQL returned an empty result set (i.e. zero rows).
While the command line runs dev_appserver.py, I try reaching the WordPress app and get instead:
Error establishing a database connection
I've removed and recreated the database (wordpress_db) and user (wp_user) without reaching the WP app.
Any suggestion how to resolve this is appreciated.
Thanks, this is my App Engine log:
2013-11-26 17:40:25 Running command: "['C:\Program Files\Python27\python.exe', u'C:\Program Files\Google\google_appengine\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', u'C:\Documents and Settings\User\My Documents\Catalyx\Catalyx-GoogleAppEngine\Catalyx']"
2013-11-26 17:40:26 (Process exited with code -1073741515)
As you have mentioned you are following googles own instructions...
then in the section titled ...
Step 4. Create your wp-config.php configuration file
where the instructions state that you should replace the existing lines with the following:
/** The name of the database for WordPress */
define('DB_NAME', '**wordpress_db**');
/** MySQL database username */
define('DB_USER', '**wp_user**');
/** MySQL database password */
define('DB_PASSWORD', '**wp_password**');
You should enter those lines without the ** either side of the words like so...
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress_db');
/** MySQL database username */
define('DB_USER', 'wp_user');
/** MySQL database password */
define('DB_PASSWORD', 'wp_password');
When you hit the default root url for your local app - normally localhost:8080 you may get some odd redirects, so instead go direct to the local Wordpress install url...
http://localhost:8082/wp-admin/install.php
You should then get the nice Wordpress install page that you were expecting
This happens to me and I have a very 'good' evening with it. So hopefully someone can found this problem earlier...
I am trying to replicate the server wordpress on localhost. After replacing the actual URL with localhost, thing works perfectly. Except one thing, the newly created page is always in "Error Establishing a Database Connection”.
Let me put in sequence why this problem happened.
on local pc I already have an old wordpress directory wp/
on server my wordpress was placed under wp/
when i copy the package to my local pc, i placed it to wp2/ (remember wp/ already taken?)
So who's the culprit? it's the .htaccess
RewriteBase /wp/
So it pointing to another database used by wp, which is of course resulting in error!
The fix is easy, just change it to wp2!
RewriteBase /wp2/
Voila! Cheers and the evening suddenly become beautiful again! :)
To fix this problem try those fixes :
Open wp-config.php, check line DB_USER, DB_PASSWORD, DB_HOST, DB_NAME. Make sure the values is same with mysql access.
If you use Dedicated server or VPS hosting, try to restart your mysql server by typing :
-service mysql restart
or
-service mysql start
but if you use shared hosting, ignore this step!
if all the previous fixes can not fix it, so it's a server-side problem! it is not your error! so let the hosting company fix this error for you because it is their error!
contact them or give them a day or so and they will solve this error and the problem will disappear automatically.
you can also check this video for the error establishing database connection fixes

Resources