Archive

Posts Tagged ‘Linux’

MySQL error 1045 (28000): Access denied for user …

June 16th, 2009

Hello everybody,

Today, my task is configuring a MySQL server to allow connections from remote computers. The problem I has met is that although port 3306 on the router was already opened, users from internet still could not connect to my MySQL Server. Here is my error message:

tuyent@local:~$ mysql -u tuyent -p -h remote-computer
Enter password: 
ERROR 1045 (28000): Access denied for user 'tuyent'@'local' (using password: YES)

Well, here is my solution:
- Step 1: Double check that the port 3306 is already opened.
- Step 2: Open MySQL configuration file (/etc/mysql/my.cnf), comment the line

# bind-address            = 127.0.0.1

- Step 3: Restart the MySQL server

$ sudo /etc/init.d/mysql restart

- Step 4: Go to mysql command line and grant permission for user

mysql> grant all on *.* to 'tuyent'@'%' identified by 'password';
mysql> grant all on *.* to 'tuyent'@'localhost' identified by 'password';
mysql> flush privileges;

Note: Remember to grant permission on both from localhost and from anywhere (’%’ indicator), and flush all privileges.

Works fine for me :)

Administration, Coding , , , , ,

Linux Remote Desktop For Controlling Windows (rdesktop)

June 15th, 2009

I am responsible for couple of windows servers and windows xp workstations too. When I work from home, I need a way to get into Windows XP/2000/Vista/2003 server for work.

rdesktop

Since I have Debain Linux at home, I needed a way to login into Microsoft windows desktop from Linux OS. Many of us working at tech support use rdesktop to connect to customers’ windows XP box.

Especially it is very useful to configure Outlook or something else when customers do not understand how to configure or troubleshoot problem. This is the best way to fix a problem.

Fortunately, Linux has rdesktop utility. It is a client for remote desktop protocol (RDP), used in a number of Microsoft products including Windows NT Terminal Server, Windows 2000 Server, Windows XP and Windows 2003 Server. You do not need to install VNC server. All you need is rdesktop client on Linux or BSD workstation.

Install rdesktop

$ sudo apt-get install rdesktop

Connect to MS Windows 2000/2003 server from Linux, type the following command at a shell prompt (connect to Windows server called mw2sn100.mycorp.com)

$ rdesktop mw2sn100.mycorp.com

Or connect to windows XP/Vista workstation having IP 192.168.1.17:

$ rdesktop 192.168.1.17

Please note that you must first enable remote desktop connection under Windows Server/XP.

* Go to Windows XP Desktop
* Right Click on My Computer
* Select properties
* Select Remote tab
* Enable Remote desktop.
* Save the changes.

Make sure enterprise firewall allows incoming connection on TCP port 3389. rdesktop supports many other options, see man page of rdesktop or visit main website of rdesktop for more information.

Original Post from: cyberciti.biz

Administration , , , ,