Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Web Hosting


Advertisements:




SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Change Mysql User Password Via Shell?


Anyone know the commands to change a MySQL user's password via ssh?

I found stuff for changing the root password, and tried to adapt it for the user, but it didn't work.


View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
How To Change Root Password From Shell
how to change root password from shell....

View Replies!   View Related
I Can't Change Mysql Password In Confixx
I have a problem:

When I try to change a password in my mysql, in confixx control panel I see:

Quote:

Unable to connect to the database

View Replies!   View Related
Change Mysql Root Password With Ssh Access?
How can change mysql root password with ssh access?

View Replies!   View Related
Change Jail Shell To Normal Shell
Do any1 know how to change jail shell to normal shell?

View Replies!   View Related
How To Change Cpanel Password With FTP Password
How to change the Password of my FTP?

I know how to change the pwd. of cPanel, but I don't know how to change the pwd. of FTP?

View Replies!   View Related
How To Execute Shell Scripts As Some User
I'm trying to write some scripts that automate the installation of a website with a content management system. This includes creating domains, installing databases etc via plesk API.

Now we have it creating the domains and databases via plesk, this is not the issue. It's permission problems issuing commands on the server.

I need to have the script install the cms and this requires writing files to a folder on the server owned by a user which is created with the domain.

e.g.
user creates timsdomain.com with ftp user name tim
Plesk makes directory on webserver called ~/vhosts/timsdomain.com/
inside this directory is a folder called httpdocs.
All the files within this folder are owned by tim.

Now my script (running as 'apache' in a folder owned by 'admin') needs to write/edit files to this directory as the user tim (or whatever user was created when the domain was set up).

How can I do this from a php script?

My idea would be to log in as the new user and then start issuing commands but I don't know how to login a user from a script.

I've tried exec, exec_shell etc
trying to log in via script as the new user using sudo/su/suid etc but they all ask for a password (for obvious reasons) but I cannot see a way to send the password to the command with the script. Ssh?

Here's some pseudocode that demonstrates what I'm trying to do, if you can think of a better way I'm all ears.

Code:
//User Fills in CMS/Domain information which becomes Form_Data

//uses plesk to create blank domain, create email addresses and empty database
Make_Domain(Form_Data) {
Plesk = Get_Plesk_Object();
Plesk.Create_Domain();
Plesk.Create_Database();
Build_CMS(Form_Data);
}

//HERE IS WHERE I AM HAVING TROUBLE: I can't figure out how to change the user so I can install files to a
// different directory other than the current user's directory (admin)

Build_CMS(Form_Data) {

change_to_user(Form_Data.ftp_username, FormData.ftp_password);
unpack_CMS_archive_into(user_directory); //eg unpack cms.tar into 'timsdomain.com' (if the above command didn't switch the current directory to users home directory)

//initialises CMS config files and installs CMS data to database
Run_Install_Scripts_On_Server(Form_Data);
//albeit complex, most important part of script
Confirm_Tim_Is_Awesome();
}

Confirm_Tim_Is_Awesome() {
while (getTim().has_moustache()) {
echo "<em>You're still awesome. </em>";
}

View Replies!   View Related
How To Create DB/User/Password?
My VPS has no control panel to do this.

how to create database, user & password for this database and how to restore a db.sql to this database.

View Replies!   View Related
How Do I Change The Root Password
I have dedicate servers and I want to change the root password. I'm using whm/cpanel.

What happen when I forget my root password?

View Replies!   View Related
Change Root Password
how can i change root's password with SSH command?

View Replies!   View Related
Password Change For Many Hosts
i have problem in my server but not in all hosts many host when i Password Modification the password change but when i open site by ftp or cpanel don't open and write that password is wrong

View Replies!   View Related
Cpanel Password Change
I searched the forum articles but couldn not find specifically what I wanted..
just learning with my dedicated server...

I want to change my cpanel password and ftp password but NOT change the msql server password. I tried to do it in WHM it also changes the database to my website and causes it to go down. (so I changed it back)

I tried to change it under: [URL to actual WHM removed] Password Modification in WHM but it changed the databse program as well.

Again all I want to change is the Cpanel acces and main FTP pass

Im doing this to keep old programmers out of my server)

View Replies!   View Related
Changing FTP User Password
I've got an ftp account that was created in the very beginning and now I want to change the password to it but when I log in to my PLESK WINDOWS OS Control Panel and go under ftp accounts, I only see one account on there which is not what I've been using.

My questions is, is there another way of locating other ftp accounts that I have? In this case, its the account that I've been always using and its not under ftp account in my plesk cp.

I just really need to change the password to it n I can't find it.

Im on Plesk Windows OS

View Replies!   View Related
Over-riding The User/password Of A Folder
I have a website where a directory is user/password protect and i want not to be prompted for the user/password when coming from a certian ip (workplace).

how would i code it?

I am guesting to use the "Satisfy directive"?

View Replies!   View Related
Change CPanel Root Pass Via Shell
Is there a way to change the CPanel root password via the shell?

View Replies!   View Related
How To Change An Email Password From SSH
I was using Direct Admin Panel, now expired!

How can we change an email password from - 'root' user?

I know we can change main domain email password by 'passwd user'. But how to change other emails with that domain?

They are surely located in /etc/vitual/domain/password , but in hashed format.

How to change via command line?

View Replies!   View Related
Change Root Password From HyperVM
Is it possible to change to root password to a VPS from inside HyperVM? I currently have 4 VPS's setup and I need to change the password for one of the VPses. Can I do this from inside HyperVM without having to go to SSH?

View Replies!   View Related
How Would A Hacker Change A Cpanel Password
I'm having a problem with a hacker...using insecure scripts on my user's accounts he changes Cpanel passwords. I do not understand how a script running as user nobody would change a Cpanel password. Any ideas on that ?

I am using mod security (rules from gotroot.com), register_globals are disabled. I also disabled the password reset feature as I thought the hacker may be resetting the passwords and then reading the new password from the email account on the server using the insecure script.

Unfortunately this guy simply doesn't stop...he seems to have a reverse DNS list or something. He is only attacking accounts on one specific server of mine but I am pretty sure he doesn't have root access.

View Replies!   View Related
Squirrelmail Password Change Option
I have 2 question regarding squirrel mail web interface..

1- Can a user change his mailbox password?

2- Is mailing forwarding option include in it?

View Replies!   View Related
How To Change Email Password From Ssh
I am just a newbie with linux and ssh.I know that we can control the server with ssh. SSH is faster and more secure than Web control.I need your help about with ssh:How to change the email password?How to add email address?How to disable/remove email address?How to forward email?Pleaser help me with one or more question above.My Server installed with Centos 4.4 with Cpanel 10.Thank you so much in advance.Longpt

View Replies!   View Related
PHP Block Shell Scripts On User Accounts
Is there any way to totally block php shell scripts on users accounts, i don't mean like the java shell in cPanel i mean a php shell script like the kind frequently used by hackers...

View Replies!   View Related
Change Password Of Multiple Email Accounts
One of our client domain.com has more than 200 email ids & they want to

change unique password for all users at one go is it possible ? if so , how can i do this .

I am running below :

cPanel 11.24.4-S35075
WHM 11.24.2 - X 3.9
CENTOS 5.3 i686 standard

View Replies!   View Related
Change Databases Password Wihout Effecting Users
my server has just compromised and someone can retrieve all databases on server with my root sql password.

i changed the root sql password to avoid attacking again and want to ask a question...do i have to change all user's databases password too?

many users have wordpress, forum and other php scripts with config file contains current database password.If i change their pass their sites will stop working.

How to do this without bothering users?

View Replies!   View Related
DirectAdmin - Access Denied For User 'apache'@'localhost' (using Password: NO)
I get the following error when let my site connect to my database: Access denied for user 'apache'@'localhost' (using password: NO)

But when im running lil test script which connect to my localhost with the same passwords and it gives the status 'Connection OK' (im running on admin account, made a MySQL account with DA)


Code:

<?php $link = mysql_connect('localhost','admin_removed','removed'); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>

View Replies!   View Related
ERROR 1045 (28000): Access Denied For User 'root'@'localhost' (using Password: NO)
Im trying to setup a mysql server on my centos vps server. Ive installed mysql server and done chkconfig and the mysql server has started. My problems start when i want to set a mysql root password.

Quote:

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

I get an error "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"

Which i totally dont understand because why would it want a password when im trying to set the password?

View Replies!   View Related
Why Should Us Change The User/group Of Apache
APache is running under the "nobody" user/group as default in CPanel servers
as a suggestion I should change it to another user/group to improve security!

But in CPanel servers its hard to do that because you must edit some scripts and files to prevent the backing to nobody when running some scripts such

PHP Code:

/scripts/chownpublichtmls/scripts/enablefileprotect 

or when create a new account

Some sites says "the secret of changing the user/group is in the UID/GID of nobody < 100 !"

so I found a solution :

1 - delete the user/goup nobody

2 - recreate it with GID/UID > 30000

3 - run /scripts/chownpublichtmls

so the question is that solution improve security or i should change the user/group to another one! like "www"?


View Replies!   View Related
Change Chroot FTP User Path
I'm using Plesk on my server and its a pain in the @** to create FTP users. So I found this article on adding chrooted FTP users. I successfully added a user, but would like to change the path now, how can I do this?

View Replies!   View Related
Get Mysql Database From Shell
I have a problem getting mysql to start, so I am planning to setup a new server and move all the mysql databases to a new server.

The problem is I normally get mysql databases when mysql is running by using mysql command lines. Now that I cannot start mysql, I cannot use that method.

Is there a mysql directory that contains all the mysql databases for me to tar it up and untar it on a different? If there is a directory that contains all the mysql databases, do I need to exclude some files/folders so it doesnt conflict with the files/folders on my new mysql server?

View Replies!   View Related
MySQL Password
I am transfering my database to a new host and well I need to create the same database (same name and username) along with the same password I used before (because a script im using is connected to it) then import the old .SQL files.

However I dont know how I can find out the current password linked to that database (When you create one it asks you for a password remember?) Anyclue how to find it out? I cant change it I need to know what it is still.

I am using cPANEL

View Replies!   View Related
Importing Large Mysql DB In Shell
if there was a way for me to cut up a large mysql database in shell. We're talking almost 8 gigs here.

I would like to import it in chucks, something like 1 gig per shot. Is that doable with some software that I can use in shell? I wouldn't want to use vim to splice up that sucker.

Or is there a better method of doing this? I already dumped this and I rather not do it again unless if I could perhaps dump this in chunks.

View Replies!   View Related
Lost MySQL Password
I can't remember my mySQL password. How can I find it out?

View Replies!   View Related
How To Reset MySQL Password For XAMPP
I have a xampp install on my Home PC(Windows) for testing scripts. I forgot the password for mysql as didn't use it for while. now Phpmyadmin won't connect.

how do i reset password for Xampp?

View Replies!   View Related
How To Reset Mysql Database Password
i just wanna reset my wordpress database password

View Replies!   View Related
Setting Root Password MySQL
I can't seem to get passed p21 of Database Driven Website by Kevin Yank. But I'm learning

Ive got the latest copy and and want to follow it through to see what i can learn (lots I'm sure)

Im on a mac osx and am trying to set the root password. He says to do this using terminal in the bin directory of my MySql installation.

Where is it? i know basics about getting round terminal i.e changing directories and stuff.

View Replies!   View Related
Fetch Admin Password From MySQL Database
I have forgot the admin password for one of our application. All the users and passwords are stored in database table "users", is there any way I can get the password from the database.. any MySQL query that will fetch the admin password from that database table.

View Replies!   View Related
MySQL Won't Accept Commands: Wrong Password
I am just trying out MySQL on the external Apache server. I must have written down the wrong password. My commands to enter mysql with a password results in denied access.

What file do I undo in order to create a new password? I don't know the exact steps I'm supposed to take. I don't think this is a MySQL issue, but a server issue, right?

I used to create databases and tables on my regular computer and left off the password altogether while I was practicing. Now I'm taking steps to do it on the actual server, and have run across this problem.

View Replies!   View Related
Joomla Installation - Username/Password Incorrect MySQL Database Error
I am trying to install Joomla on httpme.com but I seem to have problems with it recognising the username/password. Could it be a localhost issue or something?

I just can't seem to get a solution to this. I am referring to step 1 of the Joomla installation.

View Replies!   View Related
How To Change My Mysql From 5 To 4
i have a dedicated server, (free hosting company) that most of my clients use free forums that arent compatible for mysql5 so i need the latest version of mysql4
can i just install mysql 4 too?

how do i switch versions?

View Replies!   View Related
Connect To MySQL DB Only On Certain User
I am using cPanel 11 (stable release) on a CentOS 5 server and would like to make it so that a certain database can only be connected to from the cPanel user that it is under (ie. user1_db can only be connected to from the user "user1" on the same server).

View Replies!   View Related
Change Dir For Mysql
I have a server with /var too small, then i move /var/lib/mysql to another location, i've changed in /etc/my.cnf.

Quote:

datadir=/home/mysqldir
socket=/home/mysqldir/mysql.sock

I can start / stop mysql but mysql & eximstats in WHM failed. I've try :

Quote:

mysql -vv


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

View Replies!   View Related
Change Mysql Language
Where do i change the language of mysql(4.0) i have WHM on a centos 5 box i checked that the current path is /usr/share/mysql/spanish and it must be /usr/share/mysql/english
is there any way to do this?

View Replies!   View Related
Wich User Have More Mysql Process?
How can see wich user have more mysql process?

View Replies!   View Related
Allow User To Remote Mysql Connection
how to allow user to remote mysql connection from his localhost ( in linux server with WHM )

my user wants to connect to the mysql from his localhost

View Replies!   View Related
How To Find Which Mysql User Is Using All Cpu
31015 100 15 0 151m 35m 5156 S 28 0.4 379:34.10 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql

This is my top process, I have quad core server and because of this server load is over 10

I am using cPanel, is it possible to trace which user is using all this cpu?

View Replies!   View Related
MySQL Forgetting User Permissions
Does anyone know what could be the cause of this issue? I located a few others over at cpanel.net that have this problem, but no solution has been found.

[url]

I am running a VPS server with the following:

WHM 10.8.0 cPanel 10.9.1-S14304
RedHat 9 i686 - WHM X v3.1.0
phpMyAdmin - 2.9.0.2
MySQL client version: 4.1.10
mysql version: 5.0.27-standard

I have a database user that needs "Super Privileges" and so this was done. However, when Cpanel is updated the user permission is reset automatically from "ALL PRIVILEGES" to "USAGE".

Here's a look at the database permissions from phpMyAdmin.

Code:
User Host Password Global privileges Grant
hello localhost Yes ALL PRIVILEGES Yes
hello_ % No ALL PRIVILEGES Yes
hello_ localhost No ALL PRIVILEGES Yes

The user "hello" loses its "ALL PRIVILEGES" and switches over to "USAGE" if an update is triggered. Updates to cpanel, creating/removing a database/user, and updating the account password will cause the switch.

View Replies!   View Related
Mysql/user Is Marked As Crashed
I am trying to start mysql but i am getting the following error

MySQL manager or server PID file could not be found! [FAILED]
Starting MySQL................................... [FAILED]

I checked my hostname.err file in /var/lib/mysql and this is the error message it shows.

070130 17:59:41 mysqld started
070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired
070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired
070130 17:59:42 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user' is marked as crashed and should be repaired
070130 17:59:42 mysqld ended

how I would repair that to get mysql to start again?

View Replies!   View Related
What Are Common MySQL User Permissions
I want to use something like PHPBB forums and using one MySQL user and database. Just wondering, what are common user permissions I should set for the user? I want to try to minimize any permissions that can cause big risk to the server security.

Here is a full list of permissions I can grant to the user (via Webmin):

-Select table data
-Insert table data
-Update table data
-Delete table data
-Create tables
-Drop tables
-Grant privileges
-Reference operations
-Manage indexes
-Alter tables
-Create temp tables
-Lock tables

View Replies!   View Related
Backup Mysql User Privileges
how do i backup mysql user privileges?

this will only backup the databases:
mysqldump --opt -u root -p --all-databases > data.sql

i would like to backup mysql user privileges too.

View Replies!   View Related
Default Host For Mysql User
By default, mysql will create user with host as 'localhost'. Now, if I want the host is '1.2.3.4' by default, how to configure it?

View Replies!   View Related
MySQL Replication For User On Shared Server
I never did replication and do not know much about it so I figured I would ask here if anyone knows or has done it before like this.

I have a user who wants me to enable replication on my server for his user. I dont like the sounds of it on a shared environment but if there is no risk to other users and its not a big resource hog I will do it. Anyway, from what I gather I have to:

1. execute:
GRANT REPLICATION SLAVE ON user_main.* TO 'repl'@'ip-here' IDENTIFIED BY '4T6WjUZa';
[url]

2. Stop mysql server and Add in my.cnf:
[mysqld]
log-bin=mysql-bin
server-id=1
slave-compressed=1
binlog-do-db=user_main
start server[url]

3. execute:
SHOW MASTER STATUS;
we need values of colomns File and Position from output of above command[url]

So my questions are:

Is there any security risk?
Is there significant extra resource usage?
Is this even done on shared environments?

View Replies!   View Related
Mysql User Privilege Changed By Cpanel Or What
I am using Cpanel. One Cpanel account is backup. I use it to backup my database.

Under mysql, I gave this account ( backup ) many priviledges. But when the backup script ran, error said that backup account can not 'lock table'.

I gave "lock table' priviledge again and run the script, it is ok.
But after a while, when the script ran autmatically on daily basis, it lost the 'lock table' priviledge again.

I wonder if Cpanel is messing me up? What can I do about it? anyone knows?

View Replies!   View Related
MySQL: Access Denied For Root User
When I deleted a database, the user apparently was orphaned because when I tried to recreate it, it returned "user already exists". I've never encountered that problem although from Googling, I see others have and they delete the user to get around it.

When I log into mysql using the da_admin@ account and attempt to remove the user with drop user <user_name>; I receive the following error message:

ERROR 1227 (42000): Access denied; you need the CREATE USER privilege for this operation

It seems I don't have rights even as the root user. How can I get remove the orphaned user?

View Replies!   View Related
MySQL Overload Server, Wich User
how check which database / user MySQL overload the server?

View Replies!   View Related
MySQL Anyway To Log Queries Of Specific User
I know about the general log but want to just log queries of a specific user. Our database does 400 queries/s on a slow day, so I think it would be a pain to grep though a huge log like that. And, im not sure if it would cause any preformance issues.

View Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved