Allow users to drop owned prefix database - mysql

Using phpMyAdmin I created a user with all permissions granted on prefixed (eg. user_db) databases. Everything works as I would want it to, except for one thing. How do I allow users to drop the prefixed databases they have permissions for? I can't seem to find where to do that, IF that's possible at all.
EDIT:
Note that the users are permitted to drop the database, I just can't seem to find where they should do that in phpMyAdmin as for example the root user would by selecting a database from the list and then clicking 'drop'.
EDIT 2:
This is how adding a user looks for me:

When you select the database, on the right side panel at the top, there is a menu called "Operations", there you can find the "Drop the database (DROP)" option.
You will need to edit your config.inc.php file of your phpMyAdmin with:
$cfg['AllowUserDropDatabase'] = TRUE;
This will show the link on the operation menu like on the above image.
Keep in mind there is a lot other options you can manually add as well that can be seen at http://wiki.phpmyadmin.net/pma/Config#AllowUserDropDatabase

Related

Change WordPress User Password From phpMyAdmin in CPanel

I can't log into the WP Dashboard because the password I always use is incorrect. I know I can change the user info from hosting account. I logged into cPanel and went to phpMyAdmin > wp_users and proceeded to change user_pass to the appropriate password. I'm back at square 1 because I cannot log in.
you need select md5 encryption, in the function table you select md5, because wordpress use this encryption method for the password.
Image http://tinyurl.com/q3ec792
Please follow the instruction:
Through phpMyAdmin
This article is for those who have phpMyAdmin access to their database.
Note: use phpMyAdmin at your own risk. If you doubt your ability to use it, seek further advice. WordPress is not responsible for loss of data.
Begin by logging into phpMyAdmin and clicking databases.
A list of databases will appear. Click your WordPress database.
All the tables in your database will appear. If not, click Structure.
Look for wp_users in the Table column.
Click on the icon for browse.
Locate your Username under user_login
Click edit (may look like a pencil icon in some versions of
phpMyAdmin)
Your user_id will be shown, click on Edit
Next to the user_pass is a long list of numbers and letters.
Select and delete these and type in your new password.
Type in the password you want to use. Just type it in normally, but
remember, it is case-sensitive.
In this example, the new password will be 'rabbitseatcarrots'
Once you have done that, click the dropdown menu indicated, and
select MD5 from the menu.
Check that your password is actually correct, and that MD5 is in the
box.
Click the 'Go' button to the bottom right.
Test the new password on the login screen. If it doesn't work, check
that you've followed these instructions exactly.

How to add user in phpmyadmin

I want to know how to add user in phpmyadmin , I have done some research but didnot find the proper answer. I am unable to find the privilege section in phpmyadmin so that i can add a username and password . I am working on hosting and i cant see the privilege section in my phpmyadmin main's page.
Sorry for the inconvenience my english is weak
phpMyAdmin does not handle user management, rather it passes the username and password on to MySQL. create mysql User.
and If you mean, users controlling their own database, go here.
From https://wiki.phpmyadmin.net/pma/user_management :
To create a new user, click the Add a new user link near the bottom of the Privileges page (you must be a "superuser", e.g., user "root").
(emphasis mine)
Select the database on the left, then:
phpMyAdmin does handle user management, The fourth tab in the main view, "User accounts". In there, you have the section, "New", there you can add new users.
I was successful in adding user using the "User accounts" tab in the main view (as posted by Kadaiser). All privileges are global. It does not provide a way to grant privileges on any specific database. Also, one must specify the host name of the user for database connection to work (i.e. so and so#% presented connection problems).
I can never get the hang of that phpmyadmin interface.
One easy way to get around it is to click on the 'mysql' database, then click on the link SQL to write your own query:
GRANT ALL PRIVILEGES ON dbname.* TO your-new-user#host-ip IDENTIFIED BY 'his-strong-password';
When the query has run,
FLUSH PRIVILEGES;
and run that query as well.
Both your user has been created and the privileges have been set.
Instead of using the ip address, you can also add a host name if that suits you better.

How to efficiently copy MySQL databases

Is there any other way to copy MySQL databases from one computer to the other, except importing each and every database individually?
Actually in my office PC there seems to have a problem, so they are changing all the PC's in the office. My MySQL has a lot of databases in it. So I am looking for a one shot process so that all the databases gets copied to my new PC.
Yes, you can simply backup the whole database and restore it on the other PC. Find below the steps;
Backing Up Your Database
First, navigate to your phpMyAdmin page via cPanel or whatever alternative administration system your host provides i.e. Plesk etc. and log in
From the dropdown box on the left (or the text link) click on your e107 database to show all the fields
In the main page, click on the 'Export' tab
Make sure the main 'Structure' 'select all' and 'Data' boxes are ticked
In the right box, make sure 'Add drop table', 'Add AUTO_INCREMENT value' and 'Enclose table and field names with backquotes' are ticked
select the SQL format in the 'export' column'
Tick 'Save as file'
If you want the backup file compressed, tick either 'zipped' or 'gzipped'
Click 'Go'to save your file - the preferred location would be your own PC
Restoring a backup
In PhpMyAdmin main page - Click on the 'SQL' tab at the top and browse to the location of your backup file.
Then select 'Go' from the tab at the bottom right corner of the screen - you may need to empty your existing database before you can restore the backup however normally you don't as the backup will simply overwrite the existing database.
Back-up / Restore related plugins
Some plugins that might become handy for not so experienced PhpMyAdmin users:
EasyBackup plugin
EasyDBtool plugin
Dbackup plugin

can't create module in bonfire using existing tables

For some reason, I can't seem to create a bonfire module using the "existing" table option.
Earlier, it wasn't even displaying the list of fields from my database table when I selected the option to use existing table vs. creating a new one.
BUt I figured out that it was a permissions thing and so as a test I did the following:
chmod -R 777 /var/www/myapp
Now, it is querying the database and displaying all the correct fields from the table but when I click on the build button, it just keeps redisplaying the same form.
what I've done so far:
I created a test database in my database with just 2 fields. I tried to create a module using that table... but I get the same results.
I've ensured that all my tables are prefixed with "bf_". If they weren't, the system wouldn't be able to find and list all the correct fields... I think.
I've tested creating a new module using a new table. That seems to work just fine. Bonfire creates a new table in my database without any issues and also creates the correct folder structure for the module.
I've tried to ensure that all fields have a proper name validation rules specified.
In most cases, I just accepted defaults and tried to click on build.
changed logging settings to log everything. but after trying to create a module and going back to the logs, there's nothing listed.
If you have any suggestions, I'd appreciate it.
EDIT 1
Figured out how the profiler works - i didn't realize that you had to click on the flame icon on the bottom left corner of the screen.
found the issue. there's a bug with code igniter. found a bug report on their github site.
the post that i found was: https://github.com/ci-bonfire/Bonfire/issues/733

Login not possible after moving osqa database to a new site

I moved my osqa site from one machine to another machine, so I moved my mysql database too.
After I finished this, the whole site is placed at another place. When I open the new site page, all information is fine.
But when I try to log into the new site, using my username and password (registered in my old site), it can't. When I look in the database, all user information is right here, not lost..
I just copied /var/lib/mysql/osqa from one machine to another for database migration.
What could be the reason that login doesn't work?
Might need more debug information, but I wonder if in moving the database, Django is no longer able to unencrypt the passwords. If this is the case, then running user.check_password("whatever") will return False. From the shell, run the following:
from forum.models import User
user = User.objects.get(username="foo")
user.check_password("bar")
If that gives you a "False" then you know that the password is no longer working. If you get "True", then report back and we'll try something else. Good luck.