目前分類:未分類文章 (2)

瀏覽方式: 標題列表 簡短摘要

CentOS-Mysql-Access denied for user root

在CentOS(64bit)平台,無法使用root用戶進行登錄;

mysql -u root -p

ERROR 1045(28000): Access denied for user 'root'@'localhost'(using password: YES)

方法/步驟

停掉MySQL服務:

/etc/init.d/mysqld stop

使用safe模式,進行重啟:

 mysqld_safe --skip-grant-tables

 

使用root帳戶,無密碼登錄:

  mysql -u root

選擇mysql database:

  use mysql;

為root用戶更改密碼為: 123456(自行設定):

  update user set password=PASSWORD("123456") where User = 'root';

exit;離開 

 

停止MySQL 服務:

/etc/init.d/mysqld stop

重新啟動MySQL服務:

/etc/init.d/mysqld start

使用root帳戶正常登錄:

mysql -u root -p

這樣就成功改密碼了。

benson82208 發表在 痞客邦 留言(0) 人氣()

How to install VMware tools on FreeBSD server

 
FreeBSD is my favorite operating system. All my FreeBSD servers (except embedded systems on physical micro computers) are running as virtual machines. FreeBSD is officially supported GuestOS by VMware so nothing stops to virtualize FreeBSD even for productional use.

VMware Tools is a suite of utilities that enhances the performance of the virtual machine's guest operating system and improves management of the virtual machine. Although the guest operating system can run without VMware Tools, you would lose important functionality and convenience. In other words, VMware tools are not necessary but highly recommended to use on virtual machines running on top of VMware ESXi hosts.

There are multiple options how to install VMware tools on FreeBSD but I personally use Open VM Tools native FreeBSD package as using Open VM Tools is actually the latest VMware's recommendation for unix like systems which is the case of FreeBSD. The reason why I use Open VM Tools instead of VMtools delivered by VMware on ESXi hosts or VMware download site is that I can use default FreeBSD package management system (pkg) for simple deployment. It is fast, convenient and fully integrated with standard operating system update and upgrade procedures.

As you can see below, the installation on FreeBSD 10.x and above is very straight forward. Essentially, the single command and 5 lines in FreeBSD system config file.

# You have to switch to administrator account (root)
su -l root

# and install Open VM Tools by FreeBSD package manager
pkg install open-vm-tools-nox11

To run the Open Virtual Machine tools at startup, you must add the following settings to your /etc/rc.conf

vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="NO"
vmware_guest_vmmemctl_enable="YES"
vmware_guest_vmxnet_enable="YES"
vmware_guestd_enable="YES"

Easy, right?

And just for your information, Open VM tools is set of four kernel modules (vmemctl, vmxnet, vmblock, vmhgfs) and one daemon (guestd).

vmemctl is driver for memory ballooning
vmxnet is paravirtualized network driver
vmhgfs is the driver that allows the shared files feature of VMware Workstation and other products that use it. This is not optimal to use on server therefore we do not enable it.
vmblock is block filesystem driver to provide drag-and-drop functionality from the remote console.
VMware Guest Daemon (guestd) is the daemon for controlling communication between the guest and the host including time synchronization.
轉貼出處:https://www.vcdx200.com/2017/02/how-to-install-vmware-tools-on-freebsd.html

On Windows and Supported Linux Distributions exists other VMtools modules/drives but those are not supported on FreeBSD. For further information about all VMtools components look at

benson82208 發表在 痞客邦 留言(0) 人氣()