This forum is no longer active. Please post your questions to our new community site

Forums MediaWiki

mysql admin password change

Subscribe to mysql admin password change 15 post(s), 2 voice(s)

Avatar Al 9 post(s)

Hi, I installed BitNami about a month ago and have been playing with it on my Windows machine (for personal use so far – it’s not on a server).

Of course, I was having lots of questions so I was spending a lot of time on the mediawiki forums.

Lately though, there is one issue that I can’t get resolved over there.
It is to do with the fact that supposedly there exists some kind of mysql administrative password (I know nothing about mysql or apache or php, I just do what I am told) and I should change it. It was all precipitated when, in some discussion, I posted these values from LocalSettings.php file:

$wgDBtype = “mysql”;
$wgDBserver = “localhost”;
$wgDBname = “mediawiki_bitnami”;
$wgDBuser = “b**i”;
$wgDBpassword = “b

i.e. the defaults used by Bitnami.
(The administrator of those forums promptly removed those words, saying that this is a security risk for me, although later, I think they said it was ok since my router had a firewall and all that, and supposedly no body could hack into my mediawiki even if they do know those values.)

But my struggle has been to simply change those $wgDBuser and password values to something else, not defaults and I haven’t been able to do that.

if I do this:
mysqladmin -u
* -p password “my new password”

where stands for the bi defaults I get in response:

/>mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'

What can I do, anyone?

All I know is that during the initial installation of Bitnami Mediawiki, I took down this piece of information

“MySQL management tool
phpMyAdmin password is: *
*, username is Administrator”

I don’t know what this means, but if anyone knows what this is about and how it could help me with changing the default Bitnami username and password, I would appreciate it very much.

(Just to re-iterate, I am just a user, I know nothing about “stacks”, “Web servers”, “Apache” and the like, but I am quite good at following instructions).


Avatar Al 9 post(s)

Ok, I have learned now that asterisks do “bold”, instead of showing up as asterisks. Sorry.

Avatar antonio 621 post(s)

Hi Al,

What would you like exactly to change? The MediaWiki application admin password, the MySQL root password or the MySQL database user password? The first one is used to login to MediaWiki, and is set at installation time. The second one is used to control the MySQL server, and is the same password than the previous one. The third one is a standard password, and is used by the php application (MediaWiki) to change values in the mediawiki database. The database user (not root) can’t control other databases than the MediaWiki one.

I hope this all makes sense to you :)

Avatar Al 9 post(s)

Hi, Antonio.

Well, I don’t want to say it “doesn’t make sense”, but I also don’t want to lie and say that it does. Like I said before, I can learn to understand things correctly if I start building from ground up, so please assume that I am ignorant of how applications such as mediawiki, mysql and apache and php really work.

What I propose to do is that I state what I think about how it works and you can just tell me “right” if I am correct, or “right, but this detail is really so and so”, or “wrong, you are completely confused and this is what it is”. All these statements are based on things I think I know, and also things that I have been recently told on mediawiki forum.

1) Mediawiki is a “web server” application, by which I understand that it is not like a Windows, or MacOX application in that it doesn’t use those OS’s API calls etc etc, but just sits on some web server, which runs its own “operating system” and this operating system “knows” what to do with this collection of files called “mediawiki”.

2) Operating system of a web server somehow uses those programs called “Apache”, “mysql”, “php” (and probably others) to know how to deal with mediawiki files.

3) Mediawiki doesn’t store stuff I type in as HTML type code, displayed as a web page, but in something called “mysql” database.

4) MySQL can be thought of as something that organizes various bits of data in an encrypted fashion. By that I mean, it’s a collection of .frm, .MYD, .MYI and .opt files that to an outside observer look like gibberish.

5) If, however, someone has a “username” and “password”, they can login into this encrypted “mysql” database and read all this information.

*NB This is a question. You mention MySQL root password and MySQL database user password. Which of those two allows me to read unencrypted the mysql database and what would I need to do to login (using the tools provided during the installation of bitnami presumably)?

6) You emulate the afore-mentioned “server OS environment” by having my windows laptop run background tasks called “apache.exe” and “mysqld.exe”.

—I just want to start with those and see where I am at, before I continue to make (wrong) assumptions.

I guess to sum up, I would prefer to know all 3 things you mentioned:

-Mediawiki application admin username/password (which I think I know, since it asked me to create those during installation -also, is it something I would see if I type in mysql -u<$wgDBuser value> -p<$wgDBpassword value> <$wgDBname value>, then input “Select * from user;” and it appears somewhere in that long list of data

-MySQL Root (username/password) – you say it is used to “control MySQL server” and that the password is the same as for the above – what is the username?

-MySQL database (username/password). Again, by any chance, are those the $wgDBuser and $wgDBpassword values I used above?

-I also took down this info during installation – and I need help understanding what it about:

“MySQL management tool phpMyAdmin password is:, username is <also security deleting value this for>”.

Are those useful for something?

Thanks a lot,

Avatar Al 9 post(s)

Now it decided to italicize the end of my previous post…I thought italics only happened if you did the two underscore characters like this

Avatar Al 9 post(s)

Not only that but it completely mixed up the order of words between the two corner brackets and got rid of the one next to “password is:” entirely!
How funny.

Avatar antonio 621 post(s)

First of all, let’s clarify some points :)

  • Web server: A computer program that is responsible for accepting HTTP requests from clients, which are known as web browsers, and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images, etc.). Apache is a web server
  • Database Management System: A ‘database management system’ (DBMS) is computer software designed for the purpose of managing databases based on a variety of data models. MySQL is one example of this.
  • Dynamic web page: Classical hypertext navigation occurs among “static” documents, and, for web users, this experience is reproduced using static web pages. However, web navigation can also provide an interactive experience that is termed “dynamic”. Content (text, images, form fields, etc.) on a web page can change, in response to different contexts or conditions. PHP (PHP: Hypertext Preprocessor) is a computer scripting language originally designed for producing dynamic web pages.

You can find this all information, and a lot more, at the Wikipedia

1) More or less, yes.

2,3) Right.

4) MySQL is a program to create, control and query databases. Have a look at

5) Yes. The ‘root’ user is the administrator, he can do anything he wants to any database. Apart from that, you can (and should, because it’s more secure) setup other user(s) and give some permissions to them (for example, modify the contents of a certain database, but not be able to delete it). In a BitNami installation a root user is created (with the password you enter), and so another user is created only to be able to control the database. This user is the one who is configured in the ‘LocalSettings.php’ file to use the database.

Which of those two allows me to read unencrypted the mysql database and what would I need to do to login (using the tools provided during the installation of bitnami presumably)?

Both of them can. It’s adviced to use the bitnami user instead of the root one, because that way you only can modify the mediawiki database and it’s impossible to mess mysql configuration up :) There’s an utility called PhpMyAdmin used to control the database through a web page. You can use it by entering http://localhost/phpmyadmin You will be asked for a password, also set at installation time. Bear in mind that installing phpmyadmin is optional during installation, so maybe you didn’t install it.

6) More or less, yes.

Answering your questions:

- Yes, this is set at installation time.

- The username is root.

- Yes, but you can also log in as ‘root’.

- As I said, PhpMyAdmin is a web application (like MediaWiki is) used to control the databases.


Avatar Al 9 post(s)

Thanks, it did clarify a lot of questions for me.

(And it’s amazing that I didn’t get anything totally wrong.)

It’s going to take some time to digest, and I might ask some more clarifying questions later.

Anyway, now that I think I understand the basics, here are two things I really need and nobody at the mediawiki forum managed to provide me with the answers yet, perhaps you might know.

First of all, I wanted to learn how to back up my “Database” i.e. all the wiki pages that I create – I would like to be able to install another instance of mediawiki on another machine and move it all there.
So far, I have been simply copying the mysql folder and hoping that that is enough. Everybody else has been suggesting using some kind of mysqldump tool, but I have been unsuccessful in getting it to create the dump.

So, this is one thing. Ability to “Export” my database, and “import” it into a virgin installation of medaiwiki.

Another thing came up when, in the course of discussion I posted some values from LocalSettings.php file, including $wgDBuser and $wgDBpassword. Those were promptly deleted by the administartor (as we both know, they were “bitnami”) and I was told that I have just given open access to my mediawiki (i.e. mysql database) to whoever wants it.
Being a network “idiot” I was concerned, since I didn’t know if they were right, or if they were just trying to scare me. For one thing, I don’t understand how someone can “hack” into my computer (which is connected to a typical cable internet service behind a router with a built in firewall, and I only have one port open under its “Security” to use with one “video-over-ip” application). I was later told that usually people gain access to mysql databases through “TCP port 3306” and that port is not open.

Anyway, it all boiled down to them trying to tell me that I should change the password and stuff, and I realized I don’t know the first thing about how to do it. I tried some of the suggestions using mysqladmin, but to no avail.

So, while I am probably ok right now, but since later on I might like to try installing mediawiki on an actual server so that people in my company can access it remotely, it would be nice to learn about all this.

So those are the two concerns at the moment and, by the way, I was actually able to login to this phpmyadmin thing now that you have explained to me how to do it.
(I didn’t know about this http://localhost/phpmyadmin url).

So, from what I have read, “localhost” is a way to refer to my computer as if it is a server (which it seems to be now that I have installed BitNami)?


p.s. Again, thanks for your explanation. I’ll try to learn it.

Avatar Al 9 post(s)

Also, I see in this phpmyadmin page “Export”. I wanted to try exporting the database as PDF, but didn’t know how to call the file (at the bottom of the page).
It says

File name template (1): SERVER ( remember template )
Compression: None “zipped” “gzipped”

Do I just click “Go”, or do I need to change SERVER to something?

I just want to see what would happen, would I get all my pages exported as PDF, or something?

Avatar antonio 621 post(s)

To change the database user name and password, you will have to accomplish two different tasks: the easiest, change $wgDBuser and $wgDBpassword to your preferred values in ‘LocalSettings.php’.
Now, you will have to modify the values in the database itself, so go to the phpMyAdmin tool web page, and click over ‘Privileges’. There, add a new user (just username and password, don’t care about the other fields). After that, you will be taken to another page in where you can give privileges for a specific database. Choose mediawiki\_bitnami and in the next page, check all privileges.

That would do it, I’ll answer to your other question in a while :)

Avatar antonio 621 post(s)

How to export/import

Enter once again to phpmyadmin. There, you can find an ‘Export’ link, go click it. Select the ‘mediawiki_bitnami’ database, check ‘Save to file’ and click ‘Go’. You will be asked to choose a place to store the database file. Now you can safely uninstall and reinstall everything.

To import the database after installing MediaWiki, go to the phpmyadmin tool (again :D) and select ‘Import’. Then, simply browse for your file and cilck ‘Go’. After that, you will have to create the database user again, the same way that I explained you in the previous post.


Avatar Al 9 post(s)

Ok, cool, thanks.

1) Changing the user name and password.

In LocalSettings.php I commented out the “bitnami” values and added my own.
Then in phpmyadmin I did the “Privileges” thing, then Clicked on “Add new user”.
Immediately a big page came up with blank fields: in User name I entered my wgDBuser value, and in Password I entered the one for wgDBpassword one.
You said to ignore everyhing else: I did that, even though at the bottom it had lots of checkboxes under “Global Privileges”. Also, in the middle there was Database for user, where “None” was checked.

So I clicked “Go”.

Next Page appeared where it said: “You added a new user”.
Underneath it said “SQL Query”: CREATE USER ‘blahblah’ etc etc code code.

Further down it said User ‘blah blah@%’: Edit Privileges.
“Global Privileges”

Well, for one thing “Global Privileges” were on the previous page also, so how does that work that the same choices are everywhere? Nevermind.
Anyway, I clicked “Go”, because you said to choose “mediawiki\_bitnami”, and I didn’t see where I could choose it on that page.

On the next page I saw “Database-specific privileges”:
I chose “Use text field:” and entered in the blank field nearby: mediawiki_bitnami. I assumed (I hope correctly, because everything seems to be working right now, after this change) that you mistyped mediawiki_bitnami as “mediawiki\_bitnami”.

I then did “check all” for privilege check boxes.

Anyway, the result was that I had the following listed under “Privileges” in phpmyadmin:
User Host Password Global Privileges Grant

Any %—USAGE No
<my new username> % Yes ALL PRIVILEGES Yes

Then 4 other usernames, which I am sure you know, with the following
in the Host fields:

My questions about this are the following:
a) Host % – what is that – (how can I learn to understand what Host means in this whole context)?

b) What is this “Any” user?

c) Most importantly: even though I have created a new username and password, it looks like the old bitnami user is still there, and I need to understand once and for all, does that pose a security risk for me, i.e. can somebody, as moderator of mediawiki forum was suggesting, hack into my database somehow using that username? I don’t see how, but I’d love your expert opinion on this. Thanks.

2) Exporting/Importing database

I exported the database to a separate (3.4MB localhost.sql) file.
I then tried to export it as “PDF”, and at first it seemed to be “Saving” it just fine, but it stopped at the 20.2MB and wouldn’t budge for ever. I had to force end the apache.exe process.

a) Is it possible to export the database info so that the pages could be viewed as a PDF file somehow?

b) Also, is it at all possible to stop some of the certain pages from being dumped into the sql dump file (i.e. on a different installation of mediawiki I don’t want some of my personal pages to be imported, just the ones I choose to share), or is it just easier to import and then delete everything I don’t want to show there? Or is there even a way of tagging a page in a certain manner “e.g. “private”, “public” etc) that you could have different export “templates” whereby “dumpall” would dump all the data in the database, “dumppublic” would only dump all the pages tagged as “public” etc etc?

Thanks again,

Avatar antonio 621 post(s)

Hi Al,

I’m afraid I have no idea on how to export to pdf, nor the exact use of phpmyadmin, that’s something you will have to ask at the MediaWiki forums. I think it would be safe to delete the old user, and by mediawiki\_bitnami I really meant that, at least that’s what I selected in a listbox.


Avatar Al 9 post(s)

So, phpmyadmin is not something you (Bitnami – er, are you with Bitnami?) created, but a separate application like mediawiki, used to manage databases etc?

Ok, I see about \ in mediawiki\_bitnami. It says in the info tip that \ should be used to “escape wildcards _ and %” – to use them literally.

As I said, everything was working fine anyway, and I think it is because I had “global” under “Type” for my new username. Now, I actually added this thing called wildcard: mediawiki_bitnami to show up underneath “global” in that column, but that’s probably irrelevant.

I have not removed “bitnami” user, but that’s probably ok, since under “Grant” it says “No” for this user.


Avatar antonio 621 post(s)

So, phpmyadmin is not something you (Bitnami – er, are you with Bitnami?) created, but a separate application like mediawiki, used to manage databases etc?

Yes, I’m a proud member of the BitNami Team :) and no, PhpMyAdmin is not something we have developed. Its web site is located at


Forums MediaWiki