Question about Sun MySQL

1 Answer

SQL command not working

I went to the mysql prompt and typed ./bin/mysqladmin -u root password;
I get "You have an error in your SQL syntax" and it flags the entire line of code. You said "go to the installation directory of mysql (cd/usr/local/mysql)", is the same as the mysql prompt? 'Also, am I supporsed to be using 'root' as the username?

Posted by on

  • Jill Torgerson Jul 30, 2008

    femster,



    I was attempting to use the mysqldump command to convert my .frm files to a .sql file on my local machine. I was getting an ACCESS 1045 error because the username 'root' had never been associated with my password. I then attempted to create that association using the 'mysqladmin -u username -p password' command that was offered by several people, including you. I kept getting an error. I noticed from the postings that numerous other people were getting the same result. Turns out there shouldn't be spaces between the '-u' and 'username' or the '-p' and password, a simple point that wasn't stated explicitly. When I entered 'mysqladmin -uroot -ppassword', it worked.

×

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that hasĀ over 10 points.

    Mayor:

    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 71 Answers

Could you give me more info plz

Posted on Jul 30, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Could not connect to MySQL


Hi;

You can start/stop the mysql service on the server by logging into the server as root from the command line interface and run the following command/s.

service mysql stop
service mysql start
service mysql restart

You can also use the following if the above does not work fine.
Fix Toolbox for MySQL
https://www.fixtoolbox.com/repairtoolformysql.html

Jul 07, 2016 | Wolfgang Schmuck MySQL

Tip

4 Methods to Change MS SQL Server Password


Have you ever forgot or lost your MS SQL Server password? Did you reinstall MS SQL Server or change SQL Server Password by some ways at that time? I once forgot my MS SQL Server password and I reinstalled My MS SQL at last as I failed to find some good methods to solve the problem. What annoying and terrible experience it is! In order to avoid reinstalling SQL Server for a second time due to the same reason, so I collect some methods to change SQL Server password for sa account.

Method 1: Use Command Prompt to Change SQL Server Password


Step 1. Open a command prompt (Start -> Run -> cmd)
Step 2. Type the follow commands, and press Enter after each line:
Osql –S yourservername –E
1> EXEC sp_password NULL, ’yourpassword’, ’sa’
2> GO
The yourservername is the name of your server, yourpassword is the new sql sa password.
The command line 1> also can be changed to other command, the model is EXEC sp_password ‘oldpassword’, ‘newpassword’, ‘sqlaccount’.


Method 2: Use the Query Windows in Management Studio to Change MS SQL Server Password

Step 1. Open SQL Server Management Studio
Step 2. Open a new query
Step 3. Type the follow commands and excute:
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE
GO
The NewPassword is set for your SQL Server sa account.


Method 3: Change SQLServer Password by Windows Authentication

If Builtin/Administrator is present in SQL Server, you can login with an ID which is member of Administrators group and change sa password in SQL Server. Just do as follows:
1. Login into SQL server using Windows Authentication.
2. In Object Explorer, open Security folder, open Logins folder. Right Click on sa account and go to Properties.
3. Type a new SQL sa password, and confirm it. Click OK to finish.
After restarting SQL Server and all its servers, you can log into SQL Server by sa login with new SQL sa password.


Method 4: Change MS SQL Server Password with Third Party Software

In addition to the methods above, you can aslo choose some SQL Server password recovery tool to change SQL Server password. MS SQL Server Password Unlocker is one of the good MS SQL passwrod reset tools which can help you change SQL Server password in a few seconds. It allows you to chage MS SQL password on SQL Server and Express 2000/2005/2008.

Following is a guide for you to change MS SQL password with MS SQL Server Password Unlocker.
Step 1.Download and install MS SQL Server Password Unlocker.
Step 2. Run MS SQL Server Password Unlocker, click Open, import your master.mdf file. All the user names of your MS SQL Server will be displayed.
Step 3. 3. Select an SQL account, click Change password button.
Step 4. Type a new password, and then click OK.
This SQL account password has been reset. You can login with it.

Well, the four solutions are the easy-to-use MS SQL Server Password Reset ways.

on Aug 10, 2010 | Computers & Internet

2 Answers

How to fix mySQL corrupt databases?


you should follow two steps:

Create an appropriately named database on the target machine
Load the file using the mysql command:
$ mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]
Have a look how you can restore your tut_backup.sql file to the Tutorials database.
$ mysql -u root -p Tutorials < tut_backup.sql
To restore compressed backup files you can do the following:
gunzip < [backupfile.sql.gz] ' mysql -u [uname] -p[pass] [dbname]
If you need to restore a database that already exists, you'll need to use mysqlimport
command. The syntax for mysqlimport is as follows:
mysqlimport -u [uname] -p[pass] [dbname] [backupfile.sql]

Or make use of Repair Toolbox for MySQL

Demo version is here-: http://www.sql.repairtoolbox.com/

Feb 08, 2015 | Microsoft SQL Server 2000 Standard Edition...

1 Answer

Why mysql blackscreen dissapear when press enter button


this is normal for mysql server. It's simply wanting you to set the administrator password. the black box appears, you type your password, the black box closes.
This means the password is now set to what you typed in the black box (command prompt box)

Aug 07, 2014 | Microsoft Windows 7 Ultimate for PC

1 Answer

How to move one mysql database to another machine


After logging into MySQL via command prompt, use the below commands.
Backup :
databasename > dumpfile.sql
Restore :
source dumpfile.sql

If you have an IDE like HeidiSQL or SQL Yog, they can make tasks easier through visual interfaces.

Mar 12, 2013 | Computers & Internet

1 Answer

Cannot connect root@localhost error 1045


This is an access denied error. If you have specified a root password during install, you must supply it when you connect, e.g.:
mysql -p
will prompt you for the password.

Aug 23, 2011 | Sun MySQL

2 Answers

Printing syntax


'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL

'define the connection string, specify database driver
ConnString="DRIVER={SQL Server};SERVER=yourServername;UID=yourUsername;" & _
"PWD=yourPassword;DATABASE=yourDatabasename"

'declare the SQL statement that will query the database
SQL = "SELECT * FROM TABLE_NAME"

'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")

'Open the connection to the database

Connection.Open ConnString

'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection

'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("FIRST_FIELD_NAME")
Response.write Recordset("SECOND_FIELD_NAME")
Response.write Recordset("THIRD_FIELD_NAME")
Response.write "<br>"
Recordset.MoveNext
Loop
End If


'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing

May 16, 2009 | Microsoft Windows Vista Ultimate Edition

2 Answers

MYSQL Access denied


Hi Buddy,

Try this option....

mysql -u root -p

mysql will then ask you for the password give the proper password.

For changing mysql root password

mysqladmin -u root -p password <<newpwd>>

then mysql ask you to give password this is the old password and now the new password for the root will be newankush.

Sep 10, 2008 | Sun MySQL

4 Answers

Table Repair MySQL


MySQL offers Check Table syntax that checks a table or tables for errors. It works for several storage engines like MyISAM, InnoDB, & Archive. If you run this syntax then you can the cause of problem & reported tables.

If Check Table finds errors then you can repair reported tables by Repair MySQL Table syntax.

Aug 06, 2008 | Sun MySQL

4 Answers

MySQL Error Messeage


When you install MySQL for the first time, no password is set for root user.
Move to the installation directory of mysql (cd/usr/local/mysql) Set the password for user, using the following command -
./bin/mysqladmin -u <username> password

Enter your password. Then you can connect to the mysql client as
./bin/mysql -u <username> -p <password>

Jul 27, 2008 | Sun MySQL

Not finding what you are looking for?
Sun MySQL Logo

Related Topics:

141 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18357 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Cosma Papouis
Cosma Papouis

Level 3 Expert

409 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...