w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Reset MAMP Pro username and password to root/root
Assuming you still know the password, you can change the password back to root using /Applications/MAMP/Library/bin/mysqladmin -u root -p password root It'll prompt you to enter a password again, after which it'll be reset to root

Categories : Mysql

Forgotten MySQL root password
This time around, the newer version of mysql let me log in with no password. I was able to get it fixed from the command line and get it reset to what I wanted. Tried that multiple times before, so I cannot say I understand what changed now, but it did.

Categories : Mysql

How to change mysql root password
Try adding sudo in front of the kill and cat commands. Like this: sudo kill `sudo cat /usr/local/mysql/data/FitValet-MacBook-Pro.local.pid` It will then ask you for the root password for your Mac (not mysql). Enter it, and the command should execute without giving you a permission denied error.

Categories : Mysql

'root'@'localhost' access denied, no password used
Default password is '' (empty) apparently. To see what your password might be set to try this: go to wamp installation pathapps, for example C:wampappsphpmyadmin2.10.1 In this path you can find the file named config.inc.php. Open that file with any text editor and search for: $cfg['Servers'][$i]['password'] the password should be stored here.

Categories : Mysql

Changed root password for phpMyAdmin, now I can't access anything MAMP
If you have root access (by way of SSH or by way of the console) to the machine that MySQL is running on, then you can change or reset the MySQL root password by following the procedure at: http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html.

Categories : PHP

phpMyAdmin Error #1043 Cannot log in to MySQL with root password (OS X 10.8.3)
That is because you need to use the following syntax: mysqladmin -uroot -p***** (command here) I had a similar problem and I solved it by setting a blank password for root and adding this to my config.inc: $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; Then, when I successfully logged in, I changed my root password within the web based GUI. Hope this helps.

Categories : Mysql

How to allow a normal user to kill a certain root application in visudo with no password
sudo will not interpret the command as a shell script to execute. Therefore you have said that this literal command can be run as normal_user: /usr/bin/kill $(ps aux | grep 'target_application' | awk '{print $2}') However since the shell will interpret the stuff in the $(...) before sudo is called on it, the command you are running looks more like this: sudo /usr/bin/kill 1234 So it doesn't let you use it. As fedorqui suggested, you should write a script that kills the user and then give normal_user the right to run that script (make sure they don't have write access to the script or its directory though). kill_target_application.sh: #!/bin/sh /usr/bin/kill $(ps aux | grep 'target_application' | awk '{print $2}') Use this command to allow users to execute or read the script, bu

Categories : Linux

mysql Access denied for user 'root'@'localhost' (using password: NO)
I've solved this error. I'm posting this because someone could have encounter the same thing as me. The problem lies with the data source. Apparently something happen during the creation of data source. The password parameter is missing. So I deleted the current data source and created a new one again and the problem is solved.

Categories : Java

Chef: mysql cookbook does not know root's password after I change it using mysqladmin
You need to update the node's attribute to reflect the new password. One way to do that would be to use Knife and the knife-set-attribute plugin. knife set_attribute node mysql.server_root_password yournewpassword Other ways to set attributes can be explored in the Chef attribute docs.

Categories : Mysql

Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?
Use the instructions for resetting the root password - but instead of resetting the root password, we'll going to forcefully INSERT a record into the mysql.user table In the init file, use this instead INSERT INTO mysql.user (Host, User, Password) VALUES ('%', 'root', password('YOURPASSWORD')); GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;

Categories : Mysql

innobackupex restoring changes root and debian-sys-maint password. mysql restart failed
I believe you are using this tool from Percona. Then the only helpful option I can find is --databases. I will assume you do not want to maintain a list of databases in your script, you can build the list dynamically with a command like this: shell > mysql [options] -NBe "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('mysql', 'information_schema')" You should be able to integrate this call in something like this: shell > innobackupex --databases=`mysql [options] -NBe "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('mysql', 'information_schema')"` (some extra double quotes may be required, sorry, I do not have access to the tool at this time)

Categories : Mysql

mysqldbcopy - Error 1045: Access denied for user 'root'@'localhost' (using password: NO)
By looking at the link you provided, I can conclude this - You are using - mysqldbcopy --source "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" --destination "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" old:new But the link shows, mysqldbcopy --source=root:pass@localhost:3310:/test123/mysql.sock --destination=root:pass@localhost:3310:/test123/mysql.sock util_test:util_test_copy Conclusions, After --source and --destination, the example in the link you provided have '='. Try with single quotes if double quotes doesn't help. Verify if the port 3310 is correct. Default I guess when you install is 3306. Can you confirm?

Categories : Mysql

Linux skip /root/.gvfs when executing df command with non-root user
I got the solution for my own question :) In df command you can pass the file system types which you would like to exclude, in this case it is 'fuse.gvfs-fuse-daemon'. So when I execute the below the command I no more get this message "df: `/root/.gvfs': Permission denied" df -x fuse.gvfs-fuse-daemon For more details one can look into df --help option.

Categories : Linux

Root immediate child nodes icons not visible when hiding root
JTree#setShowsRootHandles(boolean newValue) controls the state of the handles for root elements. Normally, this is false. Try changing to true

Categories : Java

Is sudo-ing tomcat's startup with a non-root user the same as running it as root?
Do be aware that the recommended solution to run tomcat on port 80 is to use mod-jk with the Apache web server, not to have tomcat listen on port 80 directly.

Categories : Unix

Read and Write root folder wihout root
You can use run-as on some devices to execute commands as a particular package. Google have fixed this on Jelly Bean so it no longer works: adb shell run-as app.package.name cp /data/data/package.name/file.txt /sdcard/ exit adb pull /sdcard/file.txt ~/ Here is a good article explaining file access in Android without root permissions, including a one-liner for the above script. It details how to use the new backup command: backup -f ~/data.ab -noapk app.package.name And how to extract the contents of the resulting .ab file: dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf - You will most likely need the android.permission.BACKUP permission.

Categories : Android

Is there a way to reboot an iOS app?
Are you familiar with the Model-View-Controller design pattern? You should have your application data stored in a model object. When the user "gets to the end", you can reset the model and update your views to start over.

Categories : IOS

SVN (svnserve) virtual root --root= not recognized
svn+ssh handles the whole transaction including writing and reading the files so it ignores the --root parameter in svnserve. Here is how to fix it over at serverfault -- Basically you just make svnserve into a script that calls svnserve with the proper variables.

Categories : Svn

AppWidget ID changes on reboot
What happens if you try the following thing: Install app, place 2 widgets, reboot, place another widget and check its id? When you remove your widgets from home screen and uninstall the app some of the IDs get reset and that could be the cause of recurring ids. Also does this behavior affect your app performance and expected behavior? If not there is nothing to worry about. I have experienced the same thing when developing widgets, once i started the work my widgets had ids starting from 0,1.... now my widgets have ids of 100, but they always get unique ids in the session in which the app is installed. You shouldnt care if the ids repeat them selves if the user uninstalls the app and installs it again. Also keep in mind that after reboot you onEnabled() method from AppWidgetProvider

Categories : Android

cakephp - change password method leaves blank the password field in database
You forgot one vital part about form processing in the controller: Check on POST. if ($this->request->is('post')) { // only then try to access $this->request->data['User'] content! } In the case thats it not a post (get), you just display the form - especially without trying to save anything. Tip: Take a look at baked code (using cake bake) and you will see how it's done properly.

Categories : Cakephp

Force ubuntu key password manager to forget incorrect password for github credentials
Nevermind, I had misdiagnosed. I had in fact entered the right credentials. The problem is I had never /committed/ in my local git repository, so it didn't see any files, and when I went to push, it had no commits to push. So, simply adding: git commit -A (write your commit message) git push -u origin master solves everything, but I do wish the git error message had said something more clear, like "sorry, there are no commits to push."

Categories : GIT

Security for DataBase password and user login password in Spring and Java Encoder How to?
To encrypt properties, consider using jasypt, it integrates with Spring and Spring Security. For example you can define encrypted properties: datasource.password=ENC(G6N718UuyPE5bHyWKyuLQSm02auQPUtm) Then create a EncryptablePropertyPlaceholderConfigurer bean, which allows you refer to the properties as you normally would - they are decrypted for you: ... <property name="password" value="${datasource.password}"/> ... It's not exactly as described by your sample, but it may be a good starting point.

Categories : Java

Spring Security: use hashed password stored in database as salt of password encoder
Well, to solve my problem I implemented a custom password encoder. Basically, I overrode the matches method of the PasswordEncoder interface: @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { //encoding raw password: the given encodedPassword serves as the salt String sql = "SELECT crypt(?, ?) as hashedpwd;"; String hashedPassword = aJdbcTemplate.query(sql, new String[] {rawPassword.toString(), encodedPassword}, new ResultSetExtractor<String>() { @Override public String extractData(ResultSet rs) throws SQLException, DataAccessException { rs.next(); return rs.getString("hashedpwd"); } }); return encodedPassword.equals(hashedPassword.toString()); }

Categories : Spring

Updating encrypted password-hash stored in XML file to sync with domain password changes
I wrote a bash script that works okay for the purpose. It requires a small addition in ~/.m2/settings.xml for support (see below). The script takes one optional argument: a regex-string used to match optional tag(s) associated with one or more password-hashes in the xml file. I'm using this to indicate Domain-Name, but it could be anything (or nothing, since it is optional). The script prompts for the new password to be hashed, it constrains the newly-generated hash to be pure alpha-numeric (to avoid potential issues with unintended shell-escapes elsewhere), it makes a backup copy of the settings.xml file, and then it updates the selected hashes in settings.xml. Here is the script: #!/bin/bash # Update instances of password-hashes in ~/.m2/settings.xml for a given password [and doma

Categories : Bash

@reboot cronjob not executing
Mark Roberts pointed out a few things I'd done wrong. Namely, the spaces here MAIL = root HOME = / Get rid of those spaces.. Next, having Cron configuration fixed to email every minute.. instead of what I had : */1 * * * * /home/user/tester.py Seems to me Lubuntu doesn't support the @Reboot Cron syntax.

Categories : Python

Setting up watchdog_set_period to max value causes reboot
The link states this description on watchdog timers. A watchdog timer is a piece of hardware that can be used to automatically detect software anomalies and reset the processor if any occur. Generally speaking, a watchdog timer is based on a counter that counts down from some initial value to zero. The embedded software selects the counter's initial value and periodically restarts it. If the counter ever reaches zero before the software restarts it, the software is presumed to be malfunctioning and the processor's reset signal is asserted. The processor (and the embedded software it's running) will be restarted as if a human operator had cycled the power. You haven't posted the code so we can't judge what exactly is the problem. If you have written the code check if your code is causing

Categories : C

Start intent after Reboot
You have to add RECEIVE_BOOT_COMPLETED permission in your manifest file to get notified : <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

Categories : Android

Need a reboot after a deployment with Capistrano
I resolved the problem. Looking in the unicorn log (thanks Domon for the idea), I saw the error: error reloading config_file=/home/neurones/apps/neurones/current/config/unicorn.rb: Application has been already initialized. (RuntimeError) I changed unicorn_init.sh from: restart|reload) sig HUP && echo reloaded OK && exit 0 echo >&2 "Couldn't reload, starting '$CMD' instead" run "$CMD" ;; to restart|reload) sig USR2 && echo reloaded OK && exit 0 echo >&2 "Couldn't reload, starting '$CMD' instead" run "$CMD" ;;

Categories : Ruby On Rails

WIX Detect Pending Reboot
Since I'm using a managed installer bootstrapper application I ended up doing this in C# using: string regLoc = @"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager"; string[] regKey = (string[])Registry.GetValue(regLoc, "PendingFileRenameOperations", new string[]{"DefaultValue"}); Entries in that key are files waiting for a reboot so they can be changed. Although this isn't bulletproof, it gives a likely indicator that the install might fail because of a pending reboot.

Categories : Wix

DirectoryServices UserPrincipal.SetPassword ignores password policy (password history)
This is by design, as far as I have used it. The SetPassword is intented to act like an admin who resets user password - the complexity policy holds but there are no restrictions on the history. Suppose admin resets your password, sees "can't set the same password" - one of your passwords is compromised. Our workaround was to allow the management to go through one of our web subsystems only and persist the history of hashes so that the responsibility to verify the history was put on the custom subsystem rather than the ad.

Categories : C#

Programmatically open password-protected SQLite database with given password
Android doesn't support encrypted/password-protected SQLite manipulation. As an alternate, you may integrate H2 Database which claims to offer such protection at a cost of almost 1MB overhead.

Categories : Java

Sending password link to email when user forget password
Use this code if you want to send an email: $to = 'recepient@somemail.com'; $subject = 'Subject here'; $message = "Content"; $message .= "more Content"; $message .= "even more Content or a variable".$variable; $headers = 'From: sender@yourdomain.com' . " " . 'Reply-To: sender@yourdomain.com' . " " . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); Be aware that there are security issues like header injection if you don't validate the user input. A good email validation is this: $to = $_POST["email"]; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { /*mail is ok*/ } else {/*mail is NOT ok*/}

Categories : PHP

Using Cron to check and reboot a PHP script
You could move this whole locking logic into you php script. Since you already have everything you need (database credentials, config files with the table names...), just structure it like this: Connect database, load setup, etc... Check the last update time's difference with the current time In case it's fresh enough, exit In case it isn't fresh enough kick of the while() There are various daemon management software if you can install things on the server like monit, god, or you could simply use init with a respawn line.

Categories : PHP

nginx not starting after server reboot
I don't have much experience with Ubuntu - but have you tried running chkconfig? You can try: # sudo update-rc.d nginx defaults Or: # sudo apt-get install chkconfig # sudo chkconfig nginx on

Categories : Ubuntu

How does Zend_Cache_Backend_TwoLevels handle a server reboot
From the look of the code, the answer is "it depends". Data will be stored in both caches if the priority is high enough and the fast cache is not full or filling fast. Otherwise it will only be stored in the 'slow' cache. However I'm sure that the APC cache would be empty after a reboot. There wouldn't be any sensible way for PHP to detect this and warm that cache back up for you, and no real reason for it to. Your app should not rely on cache data being present, and should regenerate it if it is missing.

Categories : PHP

restTemplate ResourceAccessException on server reboot
No doubts java.io.EOFException appears on the server side. If you use keep-alive on your server side - switch it off like this: HttpHeaders headers = new HttpHeaders(); headers.set("Connection", "Close"); or this: System.setProperty("http.keepAlive", "false"); Another solution is changing the http client.In Spring for Android the default HTTP Client for a RestTemplate is determined by the version of Android on the device. API 9 or newer uses HttpURLConnection, older uses HTTPClient. To explicitly set the client to the old one, use yourRestTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory()); Please refer this:http://static.springsource.org/spring-android/docs/1.0.1.RELEASE/reference/htmlsingle/#d4e34 Spring RestTemplate is not an ideal REST client and unfortunatel

Categories : Android

Repeating Alarm Manager After reboot
You need to use a BroadcastReceiver and set it to respond to BOOT_COMPLETED messages. For example Register your BroadcastReceiver in the manifest <receiver android:name=".MyBootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> Handle the message within your code MyBootReceiver.java public class MyBootReceiver extends BroadcastReceiver { private static final String TAG = "MyBootReceiver"; public void onReceive(Context context, Intent intent) { Log.d(TAG, "onReceive"); Calendar cal = this.getMyCalendar(); this.scheduleAlarms(context, cal); } private Calendar getMyCalendar() { // get your calendar object } private

Categories : Android

Reboot Java Application with Linux
If you do not want to restart it using "sh run.sh" and instead you want to restart it using a command, you could use a bash alias to run the command. here is the manual (http://www.ss64.com/bash/alias.html) here is a relevant askubuntu thread about making a permanent alias (http://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias) An alias is essentially a shortcut for the terminal, for instance you had a dropbox folder located at ~/myfiles/1/2/dropbox and you did not want to type cd + path every time, you could make an alias: alias cddropbox="cd ~/myfiles/1/2/dropbox"

Categories : Java

Reboot the remote system is not working?
I would suggest to switch to subprocess module and catch output from the command launched and then decide what to do next with launched process. Let's say using system() is not considered as good practice these days for many reasons, from elegance to security. Good example what can you really do with this module are in sections 17.1.4.3. Replacing os.system() and 17.1.4.5. Replacing os.popen(), os.popen2(), os.popen3(). Trust me, using that is worth investment of couple lines of more code :-)

Categories : Python

android notification disappears after reboot
You need to create a background job (an android service) that would run after reboot and looks for saved notifications and show them. your application is killed after a reboot and therefore Android cannot communicate with it and show notifications

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.