02-09-2014
But you have root access to the machine? If so, then you can simply run "mysql" as root user, then change whichever user's password you need to change.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
If someone a Unix system administrator forgets the root password ?. What will be the consequences ?. Should the OS needs to be reinstalled ?? (6 Replies)
Discussion started by: dhanamurthy
6 Replies
2. Cybersecurity
Hi all,
This is first time I met unix in my life. I purchased old Scanning Elecron Microscope which came with 486/33MHz PC running Unix System V, ver. 3.6. The one simple user name/passw is known so I can boot and login. But can not shutdown! It asks root or su passw. I'm very sensitive not to... (6 Replies)
Discussion started by: 82026
6 Replies
3. UNIX for Advanced & Expert Users
Hi,
My root password for mysql has some problem as it dosent allow me to login....
all commands to reset it failed. so I removed mysql
yum remove mysql
and installed it by
yum install mysql mysql-devel mysql-server
and it installed fine
I gave chkconfig --levels 235 mysqld on... (1 Reply)
Discussion started by: viji19812001
1 Replies
4. Solaris
I've come across this question during interview as Sys Adm.
"How you reset lost root/superuser password on x86 system running solaris (8/9/10) which remotely located. (Not locally in front of you)"
As much as I know, you must be physically in front of the server to reset the lost... (4 Replies)
Discussion started by: shahru
4 Replies
5. UNIX for Advanced & Expert Users
How to change the ldap root password.
I have generated the password by using "slappasswd " command, but In my root machine "/etc/ldap/sldap.d" file is not there. instead of the file sldap.d directory only is there. please help me...? (0 Replies)
Discussion started by: ungalnanban
0 Replies
6. Red Hat
I need some help with Fedora. I am trying to reset the root password. When I tried to login I was not able to. I kept getting the authentication failure message. I got the password reset success message.
passwd: all authentication tokens updated successfully.
I then thought maybe the root... (6 Replies)
Discussion started by: cokedude
6 Replies
7. Emergency UNIX and Linux Support
Hi All,
I'm stuck in a severe problem here , Someone have changed the root password
and he cannot remember it and there is no other user privileged user on the system , But I do have access to a non privileged user.
On the top of the system an application which requires a theoretical ... (5 Replies)
Discussion started by: h@foorsa.biz
5 Replies
8. UNIX for Dummies Questions & Answers
I forgot the password of root and i dont know
"How to reset root password without loosing of my previous data and users." (5 Replies)
Discussion started by: yashwanthguru
5 Replies
9. Solaris
Hello, I have two old Solaris machines
$ uname -a
SunOS unknown 5.8 Generic_117350-39 sun4u sparc SUNW,UltraAX-e2
unfortunately, it has been so long ago that i have used these that the root password has left my head...
i can log into one of the machine as a normal user, but am unable to... (4 Replies)
Discussion started by: Norman Khine
4 Replies
10. UNIX for Beginners Questions & Answers
Hi ,
I ve a question about the Linux system root password change.
Which can be done using grub menu without inputting the old password.:confused:
So If anybody can change the root password without any password and then how it is secure. Anybody can manipulate the other user using the... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
LEARN ABOUT PHP
pdo_mysql-dsn
PDO_MYSQL-DSN(3) 1 PDO_MYSQL-DSN(3)
PDO_MYSQL DSN - Connecting to MySQL databases
The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:
o DSN prefix
- The DSN prefix is mysql:.
o host - The hostname on which the database server resides.
o port - The port number where the database server is listening.
o dbname - The name of the database.
o unix_socket - The MySQL Unix socket (shouldn't be used with host or port).
o charset - The character set. See the character set concepts documentation for more information. Prior to PHP 5.3.6, this element
was silently ignored. The same behaviour can be partly replicated with the PDO::MYSQL_ATTR_INIT_COMMAND driver option, as the fol-
lowing example shows.
Warning
The method in the below example can only be used with character sets that share the same lower 7 bit representation as
ASCII, such as ISO-8859-1 and UTF-8. Users using character sets that have different representations (such as UTF-16 or Big5)
must use the charset option provided in PHP 5.3.6 and later versions.
Example #1
Setting the connection character set to UTF-8 prior to PHP 5.3.6
<?php
$dsn = 'mysql:host=localhost;dbname=testdb';
$username = 'username';
$password = 'password';
$options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
);
$dbh = new PDO($dsn, $username, $password, $options);
?>
+--------+-----------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------------------------+
| 5.3.6 | |
| | |
| | Prior to version 5.3.6, charset was ignored. |
| | |
+--------+-----------------------------------------------+
Example #2
PDO_MYSQL DSN examples
The following example shows a PDO_MYSQL DSN for connecting to MySQL databases:
mysql:host=localhost;dbname=testdb
mysql:host=localhost;port=3307;dbname=testdb
mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
Note
Unix only:
When the host name is set to "localhost", then the connection to the server is made thru a domain socket. If PDO_MYSQL is compiled
against libmysqlclient then the location of the socket file is at libmysqlclient's compiled in location. If PDO_MYSQL is compiled
against mysqlnd a default socket can be set thru the pdo_mysql.default_socket setting.
PHP Documentation Group PDO_MYSQL-DSN(3)