Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328
Rep:
mysql missing Perl DBD file
Hi all (again) when I try to use the mysql_setpermission command I get the following error
bash-2.05a# mysql_setpermission -u root
Password for user root to connect to MySQL:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl .) at (eval 7) line 3, <STDIN> line 1.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Proxy.
at /usr/local/bin/mysql_setpermission line 65
What do I need to download and install to get this working???
Im running Slack8.1 and installed mysql 4.04 from source in /usr/local/
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328
Original Poster
Rep:
Okay Ive now managed to install the perl modules required.
Ive used following to setup a user dai1
bash-2.05a$ mysql_setpermission -u root
Password for user root to connect to MySQL:
######################################################################
## Welcome to the permission setter 1.2 for MySQL.
## made by Luuk de Boer
######################################################################
What would you like to do:
1. Set password for a user.
2. Add a database + user privilege for that database.
- user can do all except all admin functions
3. Add user privilege for an existing database.
- user can do all except all admin functions
4. Add user privilege for an existing database.
- user can do all except all admin functions + no create/drop
5. Add user privilege for an existing database.
- user can do only selects (no update/delete/insert etc.)
0. exit this program
Make your choice [1,2,3,4,5,0]: 3
Which database would you like to select:
You can choose from:
- bmsimple
- mysql
- test
Which database will it be (case sensitive): bmsimple
The database bmsimple will be used.
What username is to be created: dai1
Username = dai1
Would you like to set a password for [y/n]: n
We won't set a password so the user doesn't have to use it
We now need to know from what host(s) the user will connect.
Keep in mind that % means 'from any host' ...
The host please: %
Would you like to add another host [yes/no]: no
Okay we keep it with this ...
The following host(s) will be used: %.
######################################################################
That was it ... here is an overview of what you gave to me:
The database name : bmsimple
The username : dai1
The host(s) : %
######################################################################
Are you pretty sure you would like to implement this [yes/no]: yes
Okay ... let's go then ...
Everything is inserted and mysql privileges have been reloaded.
Ive then exited and attempted to connect to the database with the following
bash-2.05a$ mysql -u dai1 bmsimple
ERROR 1044: Access denied for user: '@localhost' to database 'bmsimple'
why am I getting an error about not being allowed to connect, when I use root I can connect to the database but any other account I cant.
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328
Original Poster
Rep:
yeah tried it
Ive fixed it now, instead of using the perl interface to configure it I did following (Hope this helps someone else)
#>mysql -u root -p
password : *******
SQL> GRANT ALL ON bmsimple.* TO dai1@'% ' IDENTIFIED BY '********';
SQL> GRANT ALL ON bmsimple.* TO dai1@'localhost' IDENTIFIED BY '********';
SQL> FLUSH Privileges
SQL>\q
#>mysql -u dai1 -p bmsimple
password:**********
No more error!!!! Its important to specify localhost on a seperate line if you want the user access to the server machine as the % only allows remote access.
Again I hope this will help other people at some point
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.